Question: 1. In this task, you will create a script called positional.sh that accepts the output of the date command and performs some formatting. Example solution;

1. In this task, you will create a script called positional.sh that accepts the output of the date command and performs some formatting.

Example solution;

cjingers@general:~$ ./positional.sh `date` Fri Jan 11 14:15:00 DST 2019 Today is Friday, the 11 of January 2019

- The positional parameters of your command are populated with the date command as shown in the example - Display a list of the parameters - Display the message; Today is , the of as shown in the example above

2. Create a script named math.sh that performs the following actions;

- Accepts two integers as inputs - Calculate the value of the first parameter raised to the power of the second parameter - print the first and second parameters - print the solution Example;

cjingers@general:~$ ./math.sh 2 4 2 4 16

3. Create a script named io.sh that performs the following tasks;

- Accepts a name and 3 integers as arguments - Calculate the average of the three numbers - Output the data in a table format as shown in the example below Example

cjingers@general:~$ ./io.sh "Bob" 12 14 15 Name 1st 2nd 3rd Average Bob 12 14 15 13 Remember to include the #! line in your submission.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The provided question is complete and requires you to create three separate scripts in shell scripting Let me guide you through each of these tasks st... View full answer

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!