Sunday, May 31, 2009
9:26 PM | Posted by AZ RUNE | Edit Post
The pipe (|) metacharacter connects the output from one command to the input of another command. This let's you have one command work on some data, and then have the next command deal with the results.
$ cat /home/tech-slave/bills.txt | sort | less
This command lists the contents of the /home/tech-slave/bills.txt file and pipes the output to the sort command. The sort command takes the names of the bills that begin on each line of the file and sorts them alphabetically, and pipes the output to the less command (to page thru the output).
Thanks to the O'Reilly Linux Bible 2008 Ed., their text was altered to show an example on my system.
- 2012 (1)
- 2011 (19)
- 2010 (10)
- 2009 (21)
- AZ RUNE
AZ-RUNE. Powered by Blogger.