Objective: This lab will practice writing a shell script cmdsub.sh that uses variable, arithmetic and command-substitution.

Complete this assignment on hills. Use a shell script to complete your homework. Makes sure that your resulting .sh file is readable. In order to start you off for this assignment, skeleton code has been provided here: /pub/cs/grwoo/cs160b/Lab2/cmdsub.sh. You can also download this file here. A grader should be able to run your shell script on the command line after viewing the contents.

Experiment with variables and executing commands. Your uploaded file should be named cmdsub.sh

Sample Output:

$ ./cmdsub.sh "Here is a line of text"
The line of text is: "Here is a line of text"
It has 22 characters and 6 words
There are 14 users on hills right now
Here is a random number less than 1000: 491

To submit your work, upload a copy of your cmdsub.sh file to Canvas. Any analysis of your script should be copied and pasted into the Lab 2 textbox