The power of pipes
Published on 12th July 2007 Estimated Reading Time: 1 minuteOne of the great features of the UNIX shell is that you can send the output from one command to another for further processing. Take the following example for instance:
ls -l | grep "Jul 12"
This takes the long directory file listing output and sends it to grep
for subsetting (all files created today in this example) before it is returned to the screen. The |
character is the pipe trigger, and you can have as many pipes in your command as you want, though readability may dictate how far you want to go.