Write a script that tests for at least 1 or more arguments


1. Write a script that tests for at least 1 or more arguments in the line calling the script. If there are 0 arguments (use positional parameters), then notify user ofthe problem and exit status 1. Ifuser puts in an argument, echo program running" and exit with a status of0.

2. Write a shell script that copies the file named by its first argument (it must already exist) to a file with the same name with the filename extension of.bak.

Thus, ifyou call the script with the argument first (and a file named first exists in the working directory), after the script runs you would have two files: first and first.bak Next, add a test routine to verify the user has used an argument that is a valid file andnot a directory.

Ifit ot then quit the script with an 'exit 1

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a script that tests for at least 1 or more arguments
Reference No:- TGS02869490

Expected delivery within 24 Hours