156 Chapter 8: Specifying Instructions to the Shell ° 20 MINUTES Lab Exercise 8.03: Using Command Substitution to Write Simple Scripts LaTrina's hosting provider does not allow her to write simple shell scripts. This is a problem as she is used to scripting. One task that will be particularly onerous will be her daily counts. She prides her organization on having a 1-hour turnaround on deliveries. She checks this by counting the number of requests and the number of deliveries. The numbers should be the same or very close. LaTrina's web page writes the requests and deliveries to files called requests.txt and deliveries.txt, respectively. In addition, she has several other files for which she needs a daily count. LaTrina would like you to give her one command that will count the requests.txt, deliver- ies.txt, errors.txt, users.txt, and links.txt files. You would like to use a shell script, but the UNIX shell will not allow it. You decide to use the command substitution features of UNIX. Learning Objectives In this lab, you will simulate the directory structure of LaTrina’s web site on your account. By the end of this lab, you'll be able to: e (reate a text file using a text editor ® Use command substitution to automate a process Lab Materials and Setup The materials you need for this lab are: e Computer with Red Hat Linux 7.3 installed ® Access to pico, vi, or another text editor Getting Down to Business In the following steps you will practice using the command substitution features of UNIX. You will have to apply the knowledge that you acquired in the Introduction to UNIX and Linux text- book by John Muster (McGraw-Hill/Osborne, 2002) for working with command substitution.