Redirection Forms
|
File descriptor |
Name |
Common abbreviation |
Typical default |
|
0 |
Standard input |
stdin |
Keyboard |
|
1 |
Standard output |
stdout |
Screen |
|
2 |
Standard error |
stderr |
Screen |
The usual input source or output destination can be changed as shown in Table 5-21.
|
Redirector |
Function |
|
> |
Direct standard output to |
|
< |
Take standard input from |
|
|
Pipe; take standard output of |
|
>> |
Direct standard output to |
|
>| |
Force standard output to |
|
|
Force output from the file descriptor |
|
<> |
Use |
|
<< |
Read standard input up to a line identical to |
|
|
Direct file descriptor |
|
|
Set |
|
>& |
Duplicate standard output to file descriptor |
|
<& |
Duplicate standard input from file descriptor |
|
&> |
Direct standard output and standard error to |
|
|
Close the standard input. |
|
|
Close the standard output. |
|
|
Close ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access