Write a bash script (named numcomp.sh) to read three number one after the other, then print:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a bash script (named numcomp.sh) to read three number one after the other, then print: You entered three numbers in Ascending Order: if the three number were entered in ascending order, or You entered three numbers in Descending Order: if the three number were entered in descending order, or number1 number2 number3 number1 number2 number3 You entered three numbers in Random Order Order: number1 number2 number3 If the three number were entered in a different order than the first two. NOTE: You must enter only 3 numbers - no more than that and no less than that. Following is an example where numbers were entered in different orders. Please enter first number: 12 Please enter second number: 13 Please enter third number: 15 You entered three numbers in Ascending order: 12 13 15 Please enter first number: 54 Please enter second number: 33 Please enter third number: 22 You entered three numbers in Descending Order: 54 33 22 Please enter first number: 24 Please enter second number: 11 Please enter third number: 44 You entered numbers in random order: 24 11 44 Write a bash script (named numcomp.sh) to read three number one after the other, then print: You entered three numbers in Ascending Order: if the three number were entered in ascending order, or You entered three numbers in Descending Order: if the three number were entered in descending order, or number1 number2 number3 number1 number2 number3 You entered three numbers in Random Order Order: number1 number2 number3 If the three number were entered in a different order than the first two. NOTE: You must enter only 3 numbers - no more than that and no less than that. Following is an example where numbers were entered in different orders. Please enter first number: 12 Please enter second number: 13 Please enter third number: 15 You entered three numbers in Ascending order: 12 13 15 Please enter first number: 54 Please enter second number: 33 Please enter third number: 22 You entered three numbers in Descending Order: 54 33 22 Please enter first number: 24 Please enter second number: 11 Please enter third number: 44 You entered numbers in random order: 24 11 44
Expert Answer:
Answer rating: 100% (QA)
Heres a bash script named numcompsh that fulfills your req... View the full answer
Related Book For
Stats Data and Models
ISBN: 978-0321986498
4th edition
Authors: Richard D. De Veaux, Paul D. Velleman, David E. Bock
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
This assignment requires you to complete the 2022 tax reporting for a fictional woman named Anna Smith. Question 1 T1 - step 4 - line 66 This is Anna's taxable income Answer: Question 2 T1 - step...
-
Complete the attached SWOT Worksheet using information from the Cotopaxi case. Use your SWOT Worksheet to help you answer the question: What should Davis Smith/Cotopaxi do (for company...
-
Make comparisons of thermoplastic and thermosetting polymers (a) On the basis of mechanical characteristics upon heating, and (b) According to possible molecular structures.
-
Wish List Corp. is an Internet-based, publicly traded company that allows subscribers to make wishes and also to grant wishes made by other subscribers. The company has been surprisingly successful;...
-
An electron that has a kinetic energy of \(7.5 \times 10^{-17} \mathrm{~J}\) moves in a circular orbit perpendicular to a uniform magnetic field of magnitude 0. 35 T. For this electron, determine...
-
Slaton Corporation traded a used truck for a new truck. The used truck cost $20,000 and has accumulated depreciation of $17,000. The new truck is worth $35,000. Slaton also made cash payment of...
-
Sketch a hand written a Enhanced ER diagram for this table and fix the error if there is Message cation D Notification UserNotif Password UserName UserID RoleID User D Phone User # Role securityID...
-
When we observe people and their interaction with their environment, we will most likely get a better understanding of their problems and needs. This approach is known as the empathy phase of design...
-
discuss this question: what do you perceive to be the purpose and role of Accounting? How is accounting information potentially relevant to you in your area of business? After posting your response,...
-
The following figure shows a CAN message captured on oscilloscope. The indication of whether this message is a standard message or an extended message is constituted by the The ID of this message...
-
Yale Company manufactures hair brushes that sell at wholesale for $3 per unit. The company had no beginning inventory in the prior year. These data summarize the current and prior year operations:...
-
How can a financial risk can be managed? What is financial risk? what does it include and exclude? What do we study in the financial risk manager?
-
1. Consider the Turing machine T over the input alphabet = {0, 1} with the state diagram below (the tape alphabet is = {0, 1, }). Convention: any missing transitions in the state diagram have value...
-
a. Write the value or values of the variable that make a denominator zero.These are the restrictions on the variable. b. Keeping the restrictions in mind, solve the question.
-
Uniform electric field in Figure a uniform electric field is directed out of the page within a circular region of radius R = 3.00 cm. The magnitude of the electric field is given by E = (4.50 x 10-3...
-
The mean height of American males is 69.5 inches. The heights of the 43 male U.S. presidents* (Washington through Obama) have a mean 70.78 inches and a standard deviation of 2.77 inches. Treating the...
-
The "fun size" of a Snickers bar is supposed to weigh 20 grams. Because the penalty for selling candy bars under their advertised weight is severe, the manufacturer calibrates the machine so the mean...
-
According to the American Community Survey, the mean travel time to work in Collin County, Texas, in 2013 was 27.5 minutes. The Department of Transportation reprogrammed all the traffic lights in...
Study smarter with the SolutionInn App