Syntax | Description |
---|---|
< file | stdin from file |
> file | stdout to file 1 |
>| file | stdout to file 2 |
>> file | append stdout to file |
2> file | stderr to file |
2>&1 | stderr to stdout |
&> file | both stdout and stderr to file |
> file 2>&1 | both stdout and stderr to file |
&>> file | append both stdout and stderr to file |
>> file 2>&1 | append both stdout and stderr to file |
<<END | “here-document”: stdin from lines until END |
<<-END | “here-document” with leading tabs stripped |
<<'END' | “here-document” without expansions and substitutions |
<<< string | “here-string”: stdin from string |