Question: Create variables and assigning a value to it: a . Type DOG = Shepherd and press enter b . Type echo DOG and press enter.

Create variables and assigning a value to it: a. Type DOG=Shepherd and press enter b. Type echo DOG and press enter. What do you see? c. Type echo $DOG. What do you see? d. Create variable call it MEMO and assign the value Meeting will be today at noon. f. e. Show the variable name Print the content of it. Practice arithmetic operations a. Type let X=10+2*7 b. Print the content of X c. Assign (X+2*4) to the variable Y d. Print the content of Y The export command a. Create a script called testscript b. Its content will be : echo $MY_VAR c. Make the script executable d. Assign the value 2 to MY_VAR e. Execute the script. What do you see? f. Type export MY_VAR g. Execute the script again. What do you see now? Use the grep command to find the username rtml0007 in /etc/passwd: grep -i "rtml0007"/etc/passwd Write a shell script that prompts the username to be entered as a command line argument and call it user: grep -i "$1"/etc/passwd Exercise 7 Introduction to shell scripting 6.7. Run the script as follows: a. user rtml0007 b. user fielder Change your program to prompt the user for a name to search for in the telephone book. Your program should now look something like the following: echo "Enter a name to search for: " read name grep -i $name /etc/passwd now run the script and enter your user name to be searched for.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!