the pipe operator
what does | do in the console, as in |grep? i can't find any documentation on it.
|
Briefly, it allows you to feed the output (stdout) of one process (the left side of the pipe in your case) to the input (stdin) of another process (the right side of the pipe - i.e. grep in your case).
Unix Pipe on Wikipedia |
It connects the standard output of the preceeding command to the standard input of the following command.
|
that simply redirects the output of the first command as input to the second command.
Code:
sendoutput | acceptasinput Code:
man bash |
I think the best way to learn is by doing.
Type: ps ax hit ENTER a list of processes will scroll past now type: ps ax | more and the same list will scroll by but it will pause before running off the screen. This is because you "piped" the output of the command ps ax to more. The pipe operator is the most useful in linux...learn to use it well and you will have an easy time of using linux. |
All times are GMT -5. The time now is 08:12 PM. |