Problem

In this project, you learn to use a for loop in a shell script and on the command line,...

In this project, you learn to use a for loop in a shell script and on the command line, both demonstrating how looping logic works.

To demonstrate looping logic in a shell script:

1. Create the file our_users with vi or Emacs.

2. Type the following lines into the file:

3. Save the file and exit the editor.

4. Give the file execute permission, and run it. Your results should look similar to those shown in Figure 6-11.

To demonstrate entering the same for loop at the command line:

1. At the command line, enter for USERS in john ellen tom becky eli jill and press Enter.

2. At the > prompt, type do and press Enter.

3. Type echo $USERS and press Enter.

4. Type done and press Enter. What do you see on the screen?

5. Type clear and press Enter to clear the screen for the next project.

Step-by-Step Solution

Request Professional Solution

Request Solution!

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.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search