Reference no: EM132186062
1. Write a shell script called numopt.sh to accomplish the following
· Prompt users to enter two number
· Prompt users to enter an operator: 1, 2, or 3
If users enter 1, display the sum of the two numbers
If users enter 2, display the difference of the two numbers
If users enter 3, display the product of the two numbers
If user enter any other numbers, display an invalid input message
2. Write a shell script called colorcode.sh that
· Asks users to enter a color code: R, Y, or G
o If users enter the code R, display the message "Stop, it is others' way."
o If users enter the code Y, display the message "Get ready, your lane will be ready shortly."
o If users enter the code G, display the message "Go ahead. It is your turn."
o If users enter anything else, display the message "Invalid code."
3. Write a shell script called agerange,sh that
· Asks a user to enter his or her age, then display a corresponding message based on the following decision table
If
Message
Less than 20 or greater than 50
Your age is out of range
20 - 30
You are in your 20s
30 - 40
You are in your 30s
40 - 50
You are in your 40s
4. Write a shell script called vowel.sh that
· asks users to enter a letter
o If the letter is a vowel, tells the user the letter is a vowel.
o If the letter is a consonant, tells the user the letter is a consonant.
o If the letter is anything else, tells the user the letter is invalid.
Hint: try to use case statement.