Chapter 5. And Away We Go
Based on the discussions in Chapter 3, “What Is the Shell?,” you should realize that whenever you type something like
who | wc -l
that 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 at the terminal, as in
$ who | wc -l
or it can be first typed into a file and then the file can be executed by the shell. For example, ...