Question: Develop unix shell script Description Write a shell script that accepts one argument only. The argument is pathname of a directory. The pathname could be

 Develop unix shell script Description Write a shell script that accepts

Develop unix shell script

Description Write a shell script that accepts one argument only. The argument is pathname of a directory. The pathname could be relative or absolute pathname. The script should print "ScriptName": accept one argument only" message if number of arguments is not match to i then exit. When the script starts successfully, it should check the existence of the given directory, if the directory does not exist, the script will print "DirectoryName": does not exist" then exit. Otherwise, it will print the following menu to user: PLEASE SELECT A CHOICE: 1. List name of all files that end with .sh only in the given directory. 2. List name of all files that are writable in the given directory. 3. List name and size of the file with largest size in the given directory. 4. List all filenames that have at least one digit in the given directory. Ex: ass2.sh 5. Exit Then, the script reads the user choice and prints the result on terminal. The script will display the menu and print the result continuously until the user choose exit, the script will terminate. **: you must use positional parameters to print ScriptName and DirectoryName

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!