Question: Write a bash shell script which takes two command line arguments. The first is a control flag and the second should be the name of

Write a bash shell script which takes two command line arguments. The first is a control flag and the second should be the name of a .txt file. Using a function you write for carrying out each option: If the control flag is cow, lolcat and cowsay the contents of the file If the control flag is fdata, the function should prompt the user for string data, read that data in, and then IF the data is 10 or more characters long, print it to the file (can append or overwrite) If the control flag ddata, the function should list the contents of the directory IF the file is a directory and echo Not a directory otherwise

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!