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
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....
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...
For this assignment, you will be creating a simple “Magic Number” program. When your program starts,...
For this assignment, you will be creating a simple “Magic Number” program. When your program starts, it will present a welcome screen. You will ask the user for their first name and what class they are using the program for (remember that this is a string that has spaces in it), then you will print the following message: NAME, welcome to your Magic Number program. I hope it helps you with your CSCI 1410 class! Note that "NAME" and "CSCI...
Homework 3 Before attempting this project, be sure you have completed all of the reading assignments,...
Homework 3 Before attempting this project, be sure you have completed all of the reading assignments, hands-on labs, discussions, and assignments to date. Create a Java class named HeadPhone to represent a headphone set. The class contains:  Three constants named LOW, MEDIUM and HIGH with values of 1, 2 and 3 to denote the headphone volume.  A private int data field named volume that specifies the volume of the headphone. The default volume is MEDIUM.  A private...
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...
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...
Actually a HISTORY question: what tactics does Einhard use to portray Charlemagne in "Life of Charlemagne"...
Actually a HISTORY question: what tactics does Einhard use to portray Charlemagne in "Life of Charlemagne" and what tactics does Procipius use to describe Justinian in a positive light in the "Nika Riots"? Ive posted both excerpts. "Life of Charlemagne" Charles the Great, (Charlemagne in French) reigned 768-814 as king of the Franks and the most important ruler of the Carolingian Dynasty, conquering lands in what is now Germany, France, Spain, and Italy. On Christmas Day 800 C.E., Pope Leo...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT