Skip to content

Commit

Permalink
add brief intro to stdio
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed Dec 1, 2024
1 parent 24f5020 commit 0aabb46
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions concepts/pipelines/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
We have seen how to write simple commands, where a command is followed by arguments.
Now we will see how to make more complex commands by composing simple commands.

## I/O

Before we start, a quick intro to input/output.

Processes have "standard I/O channels".

* A process can consume _input_ on "stdin".
* A process can emit _output_ on "stdout".
* A process can emit _error output_ on "stderr".

The `tr` command is a very pure example of this.
All it does is read text from its stdin, perform character transliterations, and print the resulting text to stdout.

We will see more about manipulating stdio channels later in the syllabus.

## Pipelines

This is one of the "killer features" of shell programming.
Expand Down

0 comments on commit 0aabb46

Please sign in to comment.