parsed.org
Pipe Aliases by cygnus on Dec 31, 2005 04:13 PM

If you pipe the output of command into command like less or grep often, a global alias can save you a number of characters to type:

$ alias -g G='| grep'
$ alias -g L='| less'

so that this command:

$ ls * | grep foo | less

becomes:

$ ls * G foo L

(Note: This tip taken essentially verbatim from http://www.unixtips.org/index.php3?catList=30.)

aliaspipezsh
RSS