1. Write a BASH shell script that acts as a DOS command interpreter (the user enters...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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). 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).
Expert Answer:
Answer rating: 100% (QA)
Note If you get permission denied on the bash file while running it ... View the full answer
Related Book For
Posted Date:
Students also viewed these chemistry questions
-
Write an equation in which H2PO3 acts as an acid and another in which it acts as a base.
-
Write Notes on Authority, Responsibility and Unity of Command in an Organizational Structure.
-
Write the two SQL command sequences required to: a. Create a temporary table named TEMP_1 whose structure is composed of the EMP_2 attributes EMP_NUM and EMP_PCT. b. Copy the matching EMP_2 values...
-
The annual membership fee at your health club is $750 a year and is expected to increase at 5% per year. A life membership is $7,500 and the discount rate is 12%. You either pay the annual membership...
-
The roof of an electrically heated house is 7-m long, 10-m wide, and 0.25-m thick. It is made of a flat layer of concrete whose thermal conductivity is 0.92 W/m8C. During a certain winter night, the...
-
An electromagnetic relay is modeled as shown in Figure 8.45. What force is on the armature (moving part) of the relay if the flux in the air gap is 2 mWb? The area of the gap is 0.3 cm 2 , and its...
-
Siam Resort has prepared the following budgeted amounts for its costs for 2025. Siam Resort has 32 luxury rooms available in the resort. It operates 365 days of the year. Required (a) Prepare a fixed...
-
Using the data in Table 10.2, a. What was the average annual return of Microsoft stock from 20022011? b. What was the annual volatility for Microsoft stock from20022011? TABLE 10.2 Realized Retum for...
-
For the following scenario, I need you to answer the following questions to. Be sure to cite the authority that supports your analysis for each question. Also, cite 2 scriptures in the Bible that...
-
Gulf Uniform Supply, Inc. (GUS), a merchandising business, is organized as a corporation. The business sells a complete line of uniforms for a variety of businesses and organizations, including...
-
Q 1: Find the transfer function of the high pass filter shown in Fig1. R1 R2 Vo R3
-
Which of the following components are needed for the adaptation phase of the CRISPR-Cas system? a. crRNA and Cas1 protein b. crRNA and Cas2 protein c. crRNA and Cas9 protein d. Cas1 and Cas2 proteins
-
Which of the following mechanisms may be involved when PRC1 complexes silence gene expression? a. The compaction of nucleosomes b. The attachment of ubiquitin to histone proteins c. The direct...
-
Translation can be regulated by a. translational repressors. b. antisense RNA. c. attenuation. d. both a and b.
-
During the initiation stage of translation in bacteria, which of the following events occur(s)? a. IF1 and IF3 bind to the 30S subunit. b. The mRNA binds to the 30S subunit, and tRNAfMet binds to the...
-
Which of the following can bind to ncRNAs? a. DNA b. RNA c. Proteins d. Small molecules e. All of the above
-
On December 31, 2019, McCullouch Enterprises recorded a deferred tax asset of $160,000 due to the potential tax benefits of an operating loss carry forward. McCullouch's enacted tax rates are as...
-
List four items of financial information you consider to be important to a manager of a business that has been operating for a year.
-
Describe the experiment of Stern and Gerlach. How are the results for the hydrogen atom explained?
-
Helium gas, He, at 22oC and 1.00 atm occupied a vessel whose volume was 2.54 L. What volume would this gas occupy if it were cooled to liquid-nitrogen temperature (197C)?
-
Without doing any calculations, decide what the sign of S will be for each of the following reactions. a. 2LiOH(aq) + CO2(g) Li2CO3(aq) + H2O(l) b. (NH4)2Cr2O7(s) N2(g) + 4H2O(g) + Cr2O3(s) c....
-
Define internal combustion engine and explain how it is different from external combustion engines?
-
In an air standard Otto cycle, the pressure and temperature at the start of compression stroke are 1 bar and \(30^{\circ} \mathrm{C}\), respectively. The temperature at the end of compression is...
-
In I.C. engines, power developed inside the cylinder is known as: (a) Brake horse power (b) Indicated horse power (c) Pumping power (d) None of the above
Study smarter with the SolutionInn App