Write a script called checkLetter.sh Review Greeting.sh for an example. Use a read statement and ask user to "Enter A, B, or C: "

If user types A, echo "You entered A"
If user types B, echo " You entered B"
If user types C, echo " You entered C"
Use the case structure to test the user’s string.
If user types any letter from lower case ‘a through z’ or upper case ‘D through Z’, echo "You did not enter A, B, or C".

Answers

Answer 1

Answer:

The code is given as below: The input and output is as given for one case.

Explanation:

echo -e "Enter A, B or C : \c" #Printing the line on the screen

read -rN 1 test #read the character in the variable test

echo

case $test in #Setting up the case structure for variable test

[[:lower:]] ) #checking all lower case letters

echo You did not enter A, B or C;;

[D-Z] ) #checking upper case letters from D to Z

echo You did not enter A, B or C;;

A ) #Condition to check A

echo You entered A;;

B ) #Condition to check B

echo You entered B;;

C ) #Condition to check C

echo You entered C;;

esac #Exiting the case structure

Write A Script Called CheckLetter.sh Review Greeting.sh For An Example. Use A Read Statement And Ask
Write A Script Called CheckLetter.sh Review Greeting.sh For An Example. Use A Read Statement And Ask

Related Questions

Other Questions
Mehmut is 4 times as old as his brother, butnext year he will be only 3 times as old. FindMehmut's age now?ALICIA CONYERS7:20 AM How many times can a three-dimensional object that has a radius of 1,000 units fit something with a radius of 10 units inside of it? How many times can something with a radius of 2,000 units fit something with a radius of 1 unit? Evaluate 16x^0 if x= -3 The surface inside the circles will be painted green. The surface outside the circles will be painted white. What is the ratio of green paint to white paint you will need to paint these tiles? \((\pi^2-4):\pi^2\) a \(\pi^2:(\pi^2-4)\) b \(\pi:(4-\pi)\) c \((4-\pi):\pi\) d What is the image of (-1, 1) after a dilation of 2?O (1.3)O (2.2)O (-22) Two negative integers are 8 units apart on the number line and have a product of 308. Which equation could be used to determine x, the smaller negative integer? A: x^2 + 8x 308 = 0 B: x^2 8x + 308 = 0 C: x^2 + 8x + 308 = 0 D: x^2 8x 308 = 0 A student is asked to find the length of the hypotenuse of a right triangle. The length of one leg is 26centimeters, and the length of the other leg is 24 centimeters. The student incorrectly says that thelength of the hypotenuse is 7.1 centimeters. Answer parts a and b.a. Find the length of the hypotenuse of the right triangle to the nearest tenth of a centimeter. How does the #Infinitelnclusion movement build on the goals of Infinite Flow? A. The movement empowers people with disabilities to protest for change. B. The movement works to make activities open to people of all abilities. C. The movement celebrates people of different abilities at parties. D. The movement teaches people how to lead discussions on disabilities. Which particle has no charge How many federal agencies are responsible for managing land resources in the United States?204610 Drag the expressions to show the order of their quotients from least to greatest 40 points to whoever can answer for me! Please see attached image for problem. Please. Answer Giving Brainliest!! (05.07) The net of a pyramid is shown below: The net of a square based pyramid, with base edges labeled 5 inches and the height of the triangle labeled 10 inches. The surface area of the solid is ____ square inches. If Nadia is wondering about the best way to get her metal sculpted art into a customer's hands, what area of the marketing mix does she need to consider?price place promotion Which represents continuous data? A) The number of times you flip a coin B) The number of students in a classroom C) The number of chocolate candies in a box D) The price of fish per pound Language is a complex system that includes the ways we express ourselves, such as speaking or writing, and ways we receive information, such as listening and reading. a. true b. false is it a proportional relationship Which graph represents an exponential function? g Romans sells the Regular blend for $3.60 per pound and the DeCaf blend for $4.40 per pound. Romans would like to place an order for the Brazilian and Colombian coffee beans that will enable the production of 1000 pounds of Romans Regular coffee and 500 pounds of Romans DeCaf coffee. The production cost is $0.80 per pound for the Regular blend. Because of the extra steps required to produce DeCaf, the production cost for the DeCaf blend is $1.05 per pound. Packaging costs for both products are $0.25 per pound. Formulate a linear programming model that can be used to determine the pounds of Brazilian Natural and Colombian Mild that will maximize the total contribution to profit.