Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Objective Develop UNIX shell script. Description Write a shell script that accepts one argument only. The argument is pathname of a directory. The pathname could

image text in transcribedimage text in transcribed

Objective 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 1 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. Required Files: 1. Script file with extension .sh that contains your shell programming code. 2. Word or PDF file that contains screen shots for a sample run of your script. Submission: Put all needed files in one folder and compress it then upload the compressed file on the link of submission programming assignment 2 on Elearning. Zero credit will be assigned for each program that has compile error or cheating case. Partial credit will be given to programs that executed correctly but give different results than the required in description above. Notes: You should write your name and id in the top of each file as comments. You should format your output to be clear and meaningful. You should work individually. Groups are NOT allowed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students explore these related Databases questions