What is the purpose of the echo command


Discuss the below commands:

Copy the following shell that completes the following:

#!/bin/bash
echo Select a country from the following list:
echo America, Italy, France, Germany
read country

case $country in
[Aa]merica ) echo Ford; echo Perhaps;;
[Ii]taly ) echo Ferarri;echo no;;
[Ff]rance ) echo Peugeot ;echo no way;;
[Gg]ermany ) echo Porsche ;echo yes;;

esac

Run the shell from above.

Response the following questions:

- What is the purpose of the echo command?

- In the case statement, why are the first letters both caps and lower case?

- What does esac mean?

Create your own shell that completes the following problem:

- Ask the user their name.

- Compare it to your name.

- Give a reply that their response is either your name too or it is a nice name too.

Solution Preview :

Prepared by a verified Expert
Programming Languages: What is the purpose of the echo command
Reference No:- TGS01932695

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)