Pipes and Pipelines

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.

File handles

Every command has 3 files open by default:

File # Name Script Description
Read Create Append
0stdin < Input into the command
1stdout >&1 >>&1 Output from the command
2stderr >&2 >>&2 Errors from the command

Here document

Sending multiple lines into a pipe

Here strings

Sending a string into a pipe

Last modified January 23, 2022: Test webhook (e5fbf77)