Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Note: Once you have finished all of the following three scripts (programs) and they run correctly, use the script command to capture in one file
Note: Once you have finished all of the following three scripts (programs) and they run correctly, use the script command to capture in one file (named "Assignment2") the code of each program and the output that results from running cach program. Then, submit via your course Blackboard the file "Assignment2". 1. Write a shell script called SpellOutDate that prints the detail of the current date in separate lines. For example if the current date on the system is Thu Jan 30 10:57:20 CST 2020 Then when you run your script as: S SpellOutDate Then the output should be: Time: 10:57:20 Today is: Thursday Day of the month: 30 Month: January Year: 2020 2. Write a shell script called average that accepts three numbers as input (command line arguments) and displays the average of the three. For example, if your run this script as: S average 18 12 30 The script displays The average of 18, 12 and 30 is 20 3. Write a shell script called sum that sums the numbers passed to it as arguments on the command line and displays the results. Use the for loop construct in your script. This script should work for any number of arguments
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started