Write a shell script called numopt

Assignment Help Basic Computer Science
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.

Reference no: EM132186062

Questions Cloud

Operations management process strategies are process focus : Four Operations Management process strategies are Process Focus, Repetitive Focus, Product Focus, and Mass Customization.
How you believe the program will help you achieve your goals : Describe the purpose of the Bachelor of Science in Health Administration (BSHA) program. Describe how you believe this program will help you achieve your goals.
Discuss the firm competitive and supply chain strategies : BUS 4843 SUPPLY CHAIN STRATEGY AND MANAGEMENT PROJECT - Briefly discuss the firm's competitive and supply chain strategies
What is network address translation : What is Network Address Translation (NAT)? Why would a company utilize it? Would it be more typical for a small, medium, or large company to use NAT?
Write a shell script called numopt : 1. Write a shell script called numopt.sh to accomplish the following
Determine the length of bursts of zero : Write a program to determine the length of bursts of zero's in a list of N numbers stored in an List. The program should record the length of the bursts of zero
Accountable care organizations may require organizational : Accountable care organizations may require organizational structures that
Describe how the company was breached : Read the NPR article titled "Uber Pays $148 Million Over Yearlong Cover-up of Data Breach" which can be found at Uber_Breach.
Positional bargaining approach-hold fast to store policy : Offer your opinion on whether or not Joe should take a positional bargaining approach and hold fast to the store’s policy.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Us balance of payments accounting for a given year

How Amanda's expenses will be entered in the U.S. balance of payments accounting for a given year?

  Security and validate inputs

Thankfully, there are several ways to bolster such security and validate inputs on both the client side of a browser and the server side of the Web server. In the case of the former, JavaScript is a great tool, but for the latter, PHP might be a b..

  How far does the car travel in a horizontal direction

Railways The steepest railway in the world is the Katoomba Scenic Railway in Australia. The passenger car is pulled up the mountain by twin steel cables. It travels along the track 1020 feet to obtain a change in altitude of 647 feet.

  Vlsm and explain it step by step

Submit a memo explaining the following two topics: VLSM (details on VLSM please do some research)

  A power level of 100 w is 6 db above what power level

A power level of 100 W is 6 dB above what power level?

  Calculate the equivalent temperature in fahrenheit

The value should be a DecimalNumber. Your program must then calculate the equivalent temperature in Fahrenheit.

  Participating in the land market

Briefly explain using as many examples as possible how conservation and other private individuals participating in the land market were able to increase.

  Use of menus in our applications enhance a user experience

Let's start at the very beginning. What is a file? Why is it necessary to "open" and "close" a file? What happens when we do that? What is "writing" to a file? What is the difference between writing to a sequential file and appending to it? How can t..

  What do you recommend he do about making a backup

What do you recommend he do about making a backup - The chief financial officer (CFO) of NCWR keeps a huge number of reports, spreadsheets, and other critical financial information on his computer

  Wish to represent an n-vertex graph

Suppose we wish to represent an n-vertex graph G using the edge list structure, assuming we identify the vertices with the integers in the set {0,1,...,n?1}.

  Readings regarding repetition structures-sub procedures

In the context of this week's readings regarding repetition structures, sub procedures, and functions, describe the best way of storing lines of code.

  List five attributes for a character in a video game

List five behaviors that a character in a video game should have.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd