Question: 1) Write a shell script called addtwo.sh to read in two numbers from the keyboard and print their sum. The output should consist of a

1) Write a shell script called addtwo.sh to read in two numbers from the keyboard and print their sum. The output should consist of a line showing the equation used to calculate the sum (e.g., 4 + 5 = 9). [Hint: see read, echo and let].

2) Write a shell script called logincount.sh that given a person's UID (User ID), tells you how many times that person is logged on. The output line should print out something like bschmidt is logged on 2 times. [Hint: see who, grep, and wc].

3) Write a shell script called lsdirs.sh that lists out, one line at a time, just the directories located in the current directory. [Hint: see set, test, and looping].

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!