March 2002
Beginner
504 pages
10h 47m
English
This section discusses I/O. Table A.1 describes the standard UNIX file descriptors, whereas other sections describe input and output redirections and “here” documents.
| Abbreviation | I/O description | File Descriptor |
|---|---|---|
| STDIN | Standard input | 0 |
| STDOUT | Standard output | 1 |
| STDERR | Standard error | 2 |
Input and output redirection can be performed as follows:
| cmd > file | save STDOUT from UNIX command in file |
| cmd 1> file | same as above |
| cmd >> file | append STDOUT from UNIX command to file |
| cmd 1>> file | same as above |
| cmd 2> file | save STDERR from UNIX command in file |
| cmd 2>> file | append STDERR from UNIX command in filecmd < file provide STDIN to UNIX command from file instead of keyboard ... |
Read now
Unlock full access