Useful One Liners
Useful One Liners
- Look For Blank Spaces In Seventh Field of /etc/passwd
$ awk ' /:[ \t]+$/' /etc/passwd
- Printout Define Statements from errno.h
$ grep '^#define' /usr/include/sys/errno.h
- Eliminate Blank Lines From Text File
$ egrep -v '^[ ]*$' text_file
- Change to the /usr/include directory. Then grep for "#include" in the /usr/include and /usr/include/sys Directories.
$ cd /usr/include$ (grep '^#include' *.h; grep '^#include' sys/*.h)
Notes:
60