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 ... |
Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.