File Streams #
-
standard input stdin 0
-
standard output stdout 1
-
standard error stderr 2
I/O Redirection #
Change were output goes and input comes from.
Operator | Action |
---|---|
> | Redirect to file |
>> | Append to file |
2> | Redirect stderr to file |
2>&1 | Redirect stderr to file descriptor 1, if no file then default is to screen |
&>,$>> | Redirect stdout and stderr to file |
2> /dev/null | Dispose of stderr |