Linux.com

CLI Magic: For geek cred, try these one-liners

Posted by: Anonymous [ip: 97.88.198.245] on July 23, 2008 03:01 PM
Sort will take a file name so "cat /etc/passwd | sort" can be replaced by "sort /etc/passwd".

Also, I tend to push sort as far to the end of the pipeline as possible so that I don't have to sort as much data.
For instance "gawk '$3 >= 500 {print $1 }' FS=":" /etc/passwd | sort"

#

Return to CLI Magic: For geek cred, try these one-liners