Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Write a bash script that (1) prompts the user to enter a Linux command, (2) prints out the users entered command to be executed,

a) Write a bash script that (1) prompts the user to enter a Linux command, (2) prints out the users entered command to be executed, and finally (3) executes the users entered command. The Linux command is to be read in, not passed as a command- line argument.

b) Write a bash script that will dynamically print out the day of the week (i.e., "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", or "Saturday"), that corresponds to the argument that the user specifies. This script will accept one positional parameter for which day to print. Acceptable values can be: "yesterday", "today", or "tomorrow". Anything else should result in a usage statement (i.e., an error printed out for the user). Assume the user enters all input in lowercase. As a helpful hint, you can use the date command. The d option allows you to specify a time different than the current time. For example, the d '-7day' format gives the date for seven days ago in the past. The '+%A' format sequence prints out the full weekday name. See man date for further help on the date command.

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago