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 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
Get step-by-step solutions from verified subject matter experts
