Chapter 9. User input to a script

Table of Contents

The read command
Presenting the output
The echo command
The printf command


Up to this stage, we've created scripts that are run from the command line. What about creating interactive scripts?

Throughout the duration of this chapter we want to modify our script to produce a menu system that would allow users to log on and obtain a list of our favourite restaurants.

With this goal in mind, we need some means of obtaining input from the user without telling them how to run the script from the command line.