To append to stream, use >>
The following maps the file redirect to File descriptor:
File | File Descriptor |
---|---|
STDIN | 0 |
STDOUT | 1 |
STDERR | 2 |
To join two streams you can do thing 2>&1
. This will join stderr into stdout.
To pipe output from one program to another, use: |
.
<
: Redirect stdin>
: Redirect stdout2>
: Redirect stderr