Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a shell script in Linux with the following specifications: name of script: whichday purpose: displays the day of the week on which a particular

Write a shell script in Linux with the following specifications:

name of script: whichday

purpose: displays the day of the week on which a particular date falls, for example, bash whichday Mar 9 2016. Then the result should be Wednesday.

arguments: with none, it will write to stdout a display of the correct arguments: Please enter month day year (example: Jan 5 2002)

Then write whichyears, it operates similar to whichday, that is no arguments, it displays a message saying what the arguments should be. With command line arguments similar to whichday, it finds all of the years starting from the year entered, in which the specified date falls on the same day of the week as it did in the given year. For example, if you enter: bash whichyears Apr 5 1991 it will display:

Apr 5 1991 Friday , Apr 5 1996 Friday , Apr 5 2002 Friday , Apr 5 2013 Friday. This script simply searches all the way to the current year (2016) looking for a year in which the given date falls on the same day as the given date fell in the given year.

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Discuss the benefits of a discrete trials design.

Answered: 1 week ago

Question

Has the team been empowered to prioritize the issues?

Answered: 1 week ago

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago