Question: 1. Write a BASH shell script that acts as a DOS command interpreter (the user enters the DOS command and the script executes the

1. Write a BASH shell script that acts as a DOS command interpreter (the user enters the DOS command and the script executes the corresponding Linux command) o The script should loop continuously until the user enters the QUIT command o Prior to accepting a command, display a prompt containing your first name and the greater than symbol (>) Example prompt: linux> o The DOS command, and any arguments, should be stored in variables Scommand - the DOS command (required) $arg1 - the first argument (optional) $arg2 the second argument (optional) Note: Only some DOS/Linux commands will require one or both argument variables. The script should use case statements to select the appropriate Linux command - If an unknown DOS command is entered, display the error message, Command Not Found! o 2. Refer to the table below for a list of DOS commands and their Linux counterparts (COMMAND [ARG 1] [ARG 2]) DOS Command Linux Command cd [target directory] clear cp [source file] [destination file] mkdir [directory name] touch [file name] rm [file name] CHDIR [target directory] CLS COPY [source file] [destination file] CREATEDIR [directory name] CREATEFILE [file name] DELETE [file name] DIR [file name | directory name wildcard Is file name | directory name wildcard] MOVE [source] [destination] PRINT [message to print] QUIT RENAME old name] [new name] TYPE [file name] Assume DOS commands are case-insensitive (i.e., DIR is the same as dir). mv [source] [destination] echo [message to print] N/A mv [old name] [new name] cat [file name] 

1. Write a BASH shell script that acts as a DOS command interpreter (the user enters the DOS command and the script executes the corresponding Linux command). The script should loop continuously until the user enters the QUIT command Prior to accepting a command, display a prompt containing your first name and the greater than symbol (>) Example prompt: linux> The DOS command, and any arguments, should be stored in variables $command - the DOS command (required) Sarg1 - the first argument (optional) Sarg2 - the second argument (optional) Note: Only some DOS/Linux commands will require one or both argument variables. The script should use case statements to select the appropriate Linux command If an unknown DOS command is entered, display the error message, Command Not Found! 2. Refer to the table below for a list of DoS commands and their Linux counterparts (COMMAND (ARG 1] [ARG 2]) DOS Command* CHDIR [target directory] Linux Command cd [target directory] CLS clear COPY [source file] [destination file] CREATEDIR (directory name] CREATEFILE [file name] DELETE [file name] DIR [file name | directory name | wildcard] Is [file name directory name | wildcard] MOVE (source] [destination] PRINT [message to print] QUIT RENAME [old name] [new name] TYPE [file name] cp [source file] [destination file] mkdir [directory name] touch [file name] rm [file name] mv [source] [destination] echo [message to print] N/A mv [old name] [new name] cat [file name] Assume DOS commands are case-insensitive (i.e., DIR is the same as dir).

Step by Step Solution

3.45 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Note If you get permission denied on the bash file while running it ... View full answer

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 Chemistry Questions!