pavement

Pipe

From FreeBSDwiki
Jump to: navigation, search

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