pavement

Pipe

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(Examples. Newbies need examples of actual use!)
m (Reverted edits by 63.238.216.253 (Talk); changed back to last version by Jimbo)
 

Latest revision as of 17:32, 31 December 2007

pipe -- represented by the | character (shift-\ on most keyboards) -- is a function of the shell, but works the same way in whatever shell you choose. It works, unsurprisingly, as a pipe between one command and another and is a form of redirection, like >, >> and <. Most often it's used to pipe lengthy output (e.g., ps aux) to another command, like more (or less).

Example:

ls | grep log will list .log files as well as anything with the letters "log" in it instead of the whole current directory.

Personal tools