Please enter one of the following options:
- Move empty files
- Check file size
- Which file is newer
- File check rwx
- Exit
Enter choice:
case statement to process the input from the user. If the user enters ‘1’, run the existing script move_empty. After move_empty has finished running, check its exit status. Display a message “move_empty: failure” if the exit status value is ‘55’. If the user enters ‘2’, run your existing script file_size. Prior to executing file_size, prompt the user for the filename to pass the file_size script (as an argument). If the exit status for file_size is 0, display “file_size: success”. If exit status is 2, display “file_size: failure”.
Create the following script and give a name for example linuxmenu.sh:
After saving the file, make it executable:
Output: