Question: Make a Linux Unix Script file that does the following... Task 2. bash script named script2 The name of your bash script must be script2

Make a Linux Unix Script file that does the following...

Make a Linux Unix Script file that does the following... Task 2.

bash script named script2 The name of your bash script must be

script2 and below is a description of what it should do when

executed. 1. First the script script2 checks the command line arguments. It

should have 1 or 2 or 3 command line arguments (we are

not counting the name of the script, thus script2 a is considered

Task 2. bash script named script2 The name of your bash script must be script2 and below is a description of what it should do when executed. 1. First the script script2 checks the command line arguments. It should have 1 or 2 or 3 command line arguments (we are not counting the name of the script, thus script2 a is considered to have one command line argument). If a single command line argument is used, it must be -X If two command line arguments are used, it must be -X If three command line arguments are used, it must be -x 2. If the number of arguments is wrong, the script displays what we call usage wrong number of command line arguments Usage: script2 -X or script2 -X or script2 -X and terminates 3. If the number of command line arguments is correct, but the first argument is not -X, the script displays an error message, then usage and terminates. 4. If 1 correct command line argument is used, the script displays Well done and then the script terminates. 5. If 2 command line arguments are used, the script displays Well done, filel is A and creates in the current directory a file named A. The created file contains 10 lines 1,A

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!