Question: USING LINUX BASH SCRIPT: Write a shell script that displays the following menu items. Make sure users can continue running the script until they want

USING LINUX BASH SCRIPT:

Write a shell script that displays the following menu items. Make sure users can continue running the script until they want to exit.

PLEASE use commands that when I enter the NUMBER:

1 - It Display list of files and directories in their current directory.

2 - It Display a long list of files and directories in their current directory.

3 - It Display list of 10 lines of the log file messages(var/log/messages).

4 - It Display the content of this script.

5 - It Display the content of this script in reverse order.

6 - It Exit program.

PS: Last Help I had When I ran the script it give error Like: syntax error near unexpected token ')' Plus the while loop causing the menu to repeat over and over. It supposed when I enter number 1 it will display all the files and directory on the current directory and for number two a long list of all the files and so on...you create a loop set to true and is looping through the script and output the same menu over and over

I would appreciate the help

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!