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

  Why should the project manager have good negotiation skills

How can you ensure that customer expectations are met by your project team? Why should the project manager have good negotiation skills? What should a project manager do in case there are deviations in project execution? Why is rapport building wi..

  What is the economic impact of government price controls

What is the economic impact of government price controls? Provide an example of price controls in the healthcare area.

  Mobile growth is about to be staggering

After reading the article, Mobile growth is about to be staggering (click on title to access the article), discuss the implications as related to business LANs

  Discuss your view about the modern bureaucracy

Discuss your view about the modern bureaucracy, particularly regarding the size of the bureaucracy, its role in daily public life

  Which team lost the world series each year

Which team lost the World Series each year

  Classify each product into the category

From the list of products below, classify each product into the category (convenience, shopping, specialty, unsought) that you think fits best.

  Types of questions would you have asked the end-user

What types of questions would you have asked the end-user and what issue descriptions would have led you to this conclusion?

  Calculate the standard deviation of the errors

Calculate the standard deviation of the errors (actual values-predicted values), and the mean absolute error. (For IBM/SPSS Modeler you can use the Analysis node to do this.)

  Describe ftp protocol

1. Describe FTP protocol? 2. What are the layer ports numbers used by FTP? 3. Describe SCP?

  Second number using only addition

Prompt the user for two integers. Using a loop, multiply the first number by the second number using only addition. For example:

  Identify any constraints you are unable to capture

Identify any constraints you are unable to capture in the ER diagram and briefly explain why you could not express

  Generated matrix forms a magic squares

Write a C++ program that fills random squares of 3 by 3, with unique numbers from 1 to 9, and tests if the generated matrix forms a Magic Squares.

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