Here document
Sending multiple lines into a pipe
In most script languages, a pipe is where the output of one command is passed as the input of a second command. It allows the chaining of multiple commands without the need of intermediary files.
Every command has 3 files open by default:
File # | Name | Script | Description | ||
---|---|---|---|---|---|
Read | Create | Append | |||
0 | stdin | < | Input into the command | ||
1 | stdout | >&1 | >>&1 | Output from the command | |
2 | stderr | >&2 | >>&2 | Errors from the command |