Question: Writing Bash Scripts Write a bash script called minor3.sh that accepts two command-line parameters: (1) a directory name, either absolute or relative, and (2) a

 Writing Bash Scripts Write a bash script called minor3.sh that accepts

two command-line parameters: (1) a directory name, either absolute or relative, and

Writing Bash Scripts Write a bash script called minor3.sh that accepts two command-line parameters: (1) a directory name, either absolute or relative, and (2) a size in bytes. For a valid directory, you will print out the list of files along with the size (in bytes) of each file only for those files whose size is greater than or equal to the size specified by the user in the command-line Your script must adhere to the following requirements: .If the user enters too few or too many arguments, you are to display an appropriate usage statement and terminate the program. Since the directory given in the command-line may be absolute (e.g., HOME/csce3600/sp18) or relative (e.g., ../sp18), you must check that it is a valid directory. If the directory is not valid, you will print out an error message and terminate the program. You must implement and use at least one non-trivial function in your bash script that accepts at least one parameter. . You must use at least one non-trivial sed or gawk command within your script script to a file called minor3.tmp and apply your sed and/or gawk command If no files match your criteria for the size of the file, you will print out some For use with these commands, you may wish to redirect some output from your indicator that no files matched your criteria

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!