In this project, you modify a while loop so it uses the test command.
To modify a while loop to use the test command:
1. Recall the script in your home directory named colors, which you wrote in Chapter 6. It repeatedly asks the user to guess its favorite color, until the user guesses the color red. The code for the colors script is as follows (it uses a while loop until the guess variable contains the word red)
2. Load the colors script file into vi or Emacs.
3. Change the line that reads:
to this:
while test $guess != "red" ; do
4. Save the file and exit the editor.
5. Test the script. Figure 7-11 shows sample output of the program.
6. Type clear and press Enter to clear the screen.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.