Question

You are working for a company that offers driver licence training and you have been asked...

You are working for a company that offers driver licence training and you have been asked to write a script that asks your clients how old they are.

If he/she is 16 years old display the message "Please visit our company to take the test!"

If he/she is 15 years old display the message "Please take the training with us to learn how to drive!"

If he/she enters any other answer display the message. "Please visit out website to see our services!"

Name your script "if_statement.sh" and upload both the script listing and a screenshot of the output.

Be sure to include the standard header:

# Created by Your Name

# Assignment name

# Date

Do a screen capture of the code and the output. Submit as a single Word document

Homework Answers

Answer #1

echo -n "Enter age:";
# read age
read age
#Write if else if accordingly
if [[ $age -eq 16 ]]
then
echo "Please visit our company to take the test!"
elif [[ $age -eq 15 ]]
then
echo "Please take the training with us to learn how to drive!"
else
echo "Please visit out website to see our services!"
fi

comment if any doubts

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In the previous assessment, you used a static set of named variables to store the data...
In the previous assessment, you used a static set of named variables to store the data that was entered in a form to be output in a message. For this assessment, you will use the invitation.html file that you modified in the previous assessment to create a more effective process for entering information and creating invitations for volunteers. Rather than having to enter each volunteer and create an invitation one at a time, you will create a script that will...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
For this discussion, you will demonstrate to the class how you break down a primary source....
For this discussion, you will demonstrate to the class how you break down a primary source. Historians break down primary sources in very methodical ways. Using Japanese internment and Women and the home front WWII primary source excerpts from our activities this week. I would like you to record yourself (either video, audio only, or written script) breaking down the primary source in a 2 minute or less presentation. How to Analyze a Primary Source When you analyze a primary...
What role could the governance of ethics have played if it had been in existence in...
What role could the governance of ethics have played if it had been in existence in the organization? Assess the leadership of Enron from an ethical perspective. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among the top Fortune 500 companies, collapsed in 2001 under a mountain of debt...
Discuss how the respective organizations’ relations with stakeholders could have potentially been affected by the events...
Discuss how the respective organizations’ relations with stakeholders could have potentially been affected by the events that took place at Enron and how the situation could have been dealt with differently to prevent further damage? THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among the top Fortune 500 companies,...
YOU BE THE VC COMPANY 6.1 Business Idea: Provide consumers with plant-based protein foods that take...
YOU BE THE VC COMPANY 6.1 Business Idea: Provide consumers with plant-based protein foods that take the animal out of meat—without sacrificing the taste, chew, or satisfaction. Pitch: A number of factors motivate people to seek out meat substitutes. Health benefits, animal welfare, lowering greenhouse gas emissions, and bad press about the poor conditions under which some animals are raised for slaughter are some of these factors. Many of the most common meat substitutes—tofu, bean burgers, vegetable cutlets, and so...
In narrative essay format, I want you to address a business/organization case study using multiple concepts...
In narrative essay format, I want you to address a business/organization case study using multiple concepts from class. The case question and case text begin on page 5 of this document. You need to demonstrate their best understanding of management and organizational behavior theory, and the application of those ideas to improve the understanding of various issues. You need to clearly identify at least 3 distinct, substantive issues. For each issue you need to 1), identify evidence from the case...
The assignment summary sheets will be submitted week 14 with Test 3. You are to personally...
The assignment summary sheets will be submitted week 14 with Test 3. You are to personally experience the power and satisfaction of developing these skills firsthand and to reflect and write about this experience. Over the years, many students have shared amazingly rewarding experiences as they worked on these skills. The assignment will be evaluated and be weighted as 5% of your final mark (together, they are worth 20% of your mark for Test 3, which is worth 25% of...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT