Question: 4. Write a shell script, sameDow. sh, that takes two dates as arguments in the form YYYY-MM-DD (e.g. 2018-10-01) and determines whether the two dates

 4. Write a shell script, sameDow. sh, that takes two dates

4. Write a shell script, sameDow. sh, that takes two dates as arguments in the form YYYY-MM-DD (e.g. 2018-10-01) and determines whether the two dates occurred on the same day of the week. Report an error if either of the dates given is notin the correct format or an invalid date. The input and output to/from the script should essentially follow this format: an example where the days of the week don't match $./sameDow.sh 2018-09-30 2018-10-01 First day of the week is a Sunday Second day of the week is a Monday Days of the week don't match. an example where the days of the week do match $ ./sameDow.sh 2018-09-24 2018-10-01 First day of the week is a Monday Second day of the week is a Monday Days of the week match Hint: Read the documentation for the UNIX date command before writing any code. 4. Write a shell script, sameDow. sh, that takes two dates as arguments in the form YYYY-MM-DD (e.g. 2018-10-01) and determines whether the two dates occurred on the same day of the week. Report an error if either of the dates given is notin the correct format or an invalid date. The input and output to/from the script should essentially follow this format: an example where the days of the week don't match $./sameDow.sh 2018-09-30 2018-10-01 First day of the week is a Sunday Second day of the week is a Monday Days of the week don't match. an example where the days of the week do match $ ./sameDow.sh 2018-09-24 2018-10-01 First day of the week is a Monday Second day of the week is a Monday Days of the week match Hint: Read the documentation for the UNIX date command before writing any code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!