Add support for piping using other file descriptor than fd 1

darcs-hash:20051007140857-ac50b-314a47d98ccd09e837be7bd81ebe58d5144c3499.gz
This commit is contained in:
axel
2005-10-08 00:08:57 +10:00
parent 8ff36deeb4
commit 1917ce96f4
6 changed files with 78 additions and 25 deletions

View File

@@ -155,9 +155,7 @@ equivalent.
The user can string together multiple commands into a so called
pipeline. This means that the standard output of one command will be read
in as standard input into the next command. This is done by separating
the commands by the pipe character (|).
For example
the commands by the pipe character (|). For example
<tt>cat foo.txt | head</tt>
@@ -169,6 +167,17 @@ to combine commands through pipes, read the manual pages of the
commands you want to use using the 'man' command. If you want to find
out more about the 'cat' program, type <tt>man cat</tt>.
Pipes usually connect file descriptor 1 (standard output) of the first
process to file descriptor 0 (standard input) of the second
process. It is possible use a different output file descriptor by
prepending it to the pipe symbol, just like you would do with normal
IO redirections. For example:
<tt>make fish 2|less</tt>
will attempt to build the fish program, and any errors will be shown
using the less pager.
\subsection syntax-background Background jobs
When you start a job in \c fish, \c fish itself will pause, and give