Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Programming Language Expert

Task:

Develop a Shell script named “menu” to display Special of the day, depending on the day of the week. The specials are:

Monday Lobster Platter
Tuesday  Sea Food Salad
Wednesday Steak and Fish Combo
Thursday King Crab
Friday Prime Ribs
Saturday Jumbo Shrimp
Sunday Triple Delight

Synopsis:

menu [-d day][-a]

Description:

If no argument is entered by the user, the program checks the system date for today's day and displays the appropriate Special. The “[-d day]” denotes that this program allows a day of week to be specified. In other words, when this option is used, the program displays Today's Special for the specified day. The “[-a]” option will display all Specials. It is NOT allowed to specify both “[-a]” and “[-d day]” options at the same time. When validating the entered day, the program ignores the case sensitivity and checks only the first three characters; thus, Mon, mOn, and mon will all be interpreted as Monday.

Shown below are some sample runs of the above script:

UNIX> menu
Monday special is: Lobster Platter
UNIX> menu -d wEd
Wednesday special is: Steak and Fish Combo
UNIX> menu -d what
what is an invalid day
UNIX> menu -a -d Mon
-a and -d cannot be used at the same time
UNIX> menu -k Sun
-k is an invalid option

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91822

Have any Question? 


Related Questions in Programming Language

Assignment programming project expression treesthis project

Assignment Programming Project: Expression Trees This project deals with a simple kind of expression trees, in which there are two kinds of nodes: (a) Leaf nodes, which contain a real number as their clement; and (b) Non ...

Assignmentafter informing the user what the program does

Assignment After informing the user what the program does, prompt the user for the number of darts to throw. Also, prompt for a number of simulations (why not have the program simulate this dart throwing more than once). ...

Assignmentthe csit racing club is a group that runs amateur

Assignment The CSIT Racing Club is a group that runs amateur car racing events throughout the US. In This project, write a program that will help the club determine the winner of their Fall Rally Race. You will need to d ...

Fundamentals functions amp arraysplease refer to

Fundamentals, Functions & Arrays Please refer to announcements for details about this exam. Make sure you fill the information below to avoid not being graded properly; Here is the grading matrix where the TA will leave ...

Resources appendices a amp dexamine the following

Resources: Appendices A & D Examine the following situation: Your company, Datamax, Inc., is in the process of automating its payroll systems. Your manager has asked you to create a program that calculates overtime pay f ...

Generate code for the following three-address statements

Generate code for the following three-address statements assuming stack allocation where register SP points to the top of the stack. call p call q return call r return return

Question 1briefly explain these main programming paradigm

Question 1: Briefly explain these main programming paradigm (Logic, Functional, Object Oriented, Procedural, Imperative and Aspect-oriented), and for each of these paradigms name at least one language that can be used fo ...

Assignmentindent code and insert comments to document your

Assignment Indent code and insert comments to document your program. Program must be implemented and run as instructed. Source file and executable are placed in a folder. Define the class with the name BankAccount to sto ...

Generate code for the given three-address statements

Generate code for the given three-address statements assuming all variables are stored in memory locations. a) x = 1 b) x = a c) x = a + 1 d) x = a + b e) The two statements x = b * c y = a + x

Handling exceptions in the guestbook applicationgeneral

Handling Exceptions in the Guestbook Application General guideline In this project, you will need to implement exception handling mechanism in the Guestbook application created in Lab. The code I provide to you does not ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen