Pipe
From FreeBSDwiki
(Difference between revisions)
m (Reverted edits by 63.238.216.253 (Talk); changed back to last version by Jimbo) |
|||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
[[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]]). | [[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. | ||
+ | |||
[[Category:FreeBSD Terminology]] | [[Category:FreeBSD Terminology]] |
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.