March 2021
Intermediate to advanced
704 pages
18h 20m
English
Memory Tables
Table 2-2 Standard Input, Output, and Error Overview
Name |
Default Destination |
Use in Redirection |
File Descriptor Number |
|---|---|---|---|
Computer keyboard |
< (same as 0<) |
0 |
|
Computer monitor |
> (same as 1>) |
1 |
|
STDERR |
|
2> |
2 |
Table 2-3 Common Bash Redirectors
Redirector |
Explanation |
|---|---|
(same as 1>) |
Redirects STDOUT. If redirection is to a file, the current contents of that file are overwritten. |
(same as 1>>) |
Redirects STDOUT. If output is written to a file, the output is appended to that file. |
Redirects STDERR. |
|
Redirects STDERR to the same destination as STDOUT. Notice that this has to be used in combination with normal output redirection, as in ls whuhiu > errout 2>&1. |
|
(same as 0<) |
Redirects ... |