Reference no: EM132268540
A unix/Linux shell script assignment - Shell scripts
You are required to write a UNIX shell script (a shell program) to complete a buy tickets system for customer to use.
It should have the following functions:
Buy could be once, or, multi-times without terminating the current session.
The program should produce a summarized report for eachbuy.
Exit the system when your order is completed.
Your session should be similar to: buyTickets" on the first line of the screenshot above is the name of the shell program which you should create for this task.
It should be able to recognize the commands "quit" and "buy", which are functions defined below: . "quit" - displays a message such as "-----Thanks for your purchase! -----" and then quit the program.?
"buy" - starts your buying with prompts that takes inputs and produces a summary for your buying (with time and date as well), as shown in the screenshot above.
The program should accept your choices either in uppercase or lowercase, such as, "quit" or "QUIT", "buy" or "BUY".
At the end of each purchase, you should have the option to execute another purchase, or quit the program.
If you enter a wrong choice, for example 'ok', the program should recognize it and display a message, such as: 'Sorry, 'ok' is not a valid choice. Please enter 'quit' or 'buy'.' until a correct choice is entered, i.e. 'quit' or 'buy'.