next up previous
Next: Remotely shutting down your Up: Linux/UNIX Previous: Customizing your prompt

Piping and xargs

The pipe '|' (usually shift-backtab on the keyboard) allows you to pass the output of one Unix command into another. E.g.
ls | more

You can pipe the output of one command as the arguments of another command using xargs:
ps | grep 'emacs' | cut -d' ' -f2 | xargs kill
This finds jobs involving emacs and kills them.

Last modified: 12/14/08.

Chris Paciorek 2012-01-21