Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Explain the two meanings that the term equality can have.

Answered: 1 week ago

Question

What aspects would it be impossible to capture?

Answered: 1 week ago

Question

Enhance your words with effective presentation aids

Answered: 1 week ago