Pipe

From Hackepedia
Revision as of 11:31, 5 October 2005 by Pbug (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

If you need to send the output of one program to another program this is done by way of piping. For example you are listing the directory of your current working directory and want to see it in chunks called pages, you'll pipe the output of ls to more like so:

$ ls | more

when you create along chain of piped commands this is called a pipe chain and can look like this:

$ ps ax | grep httpd | awk '{print $1}' | xargs kill