Question: Write a bash script which: if run without parameters, prints an error message and exits takes 1 parameter, which must be a valid path (absolute

 Write a bash script which: if run without parameters, prints an

Write a bash script which: if run without parameters, prints an error message and exits takes 1 parameter, which must be a valid path (absolute or relative) if run with 1 parameter which cannot be interpreted as a path prints an error msg and exits . if run with more than 1 parameter, uses the first parameter and ignores the rest if the value of the first parameter does not exist creates it if the value of the first parameter exists but is not a directory, print an error msg and exit . if the value of the first parameter exists, copies the script itself to that directory

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!