Sunday, May 31, 2009
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.

arizona.rune@gmail.com

0 comments:

Pages

About Me

AZ-RUNE. Powered by Blogger.

Followers