4. And Away We Go
who | wc -l
you are actually programming in the shell. That’s because the shell is interpreting the command line, recognizing the pipe symbol, connecting the output of the first command to the input of the second, and initiating execution of both commands.
In this chapter, you’ll learn how to write your own commands and how to use shell variables.
A shell program can be typed directly, as in
$ who | wc -l
or it can be typed into a file and then the file can be executed by the shell. For example, suppose that you need to find out the number of logged-in users several times throughout the day. ...