06.08.2015 Views

POS 420 Week 3 Individual Linux Script Worksheet/ Uoptutorial

For more course tutorials visit www.uoptutorial.com Individual Assignment • Copy the following shell that completes the following: #!/bin/bash echo Select a country from the follow-ing list: echo America, Italy, France, Germany read country case $country in [Aa]merica ) echo Ford; echo Per-haps;; [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. • Answer the following questions: ◦ What is the purpose of the echo command? ◦ In the case statement, why are the first let-ters both caps and lower case? ◦ What does esac mean? • Submit the answers to these questions to your faculty member for grading. • Create your own shell that completes the fol-lowing 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. ◦ Submit a listing of this shell to your faculty member for grading. Individual Individual Forum Day 7

For more course tutorials visit
www.uoptutorial.com

Individual Assignment
• Copy the following shell that completes the following:
#!/bin/bash
echo Select a country from the follow-ing list:
echo America, Italy, France, Germany
read country
case $country in
[Aa]merica ) echo Ford; echo Per-haps;;
[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.
• Answer the following questions:
◦ What is the purpose of the echo command?
◦ In the case statement, why are the first let-ters both caps and lower case?
◦ What does esac mean?
• Submit the answers to these questions to your faculty member for grading.
• Create your own shell that completes the fol-lowing 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.
◦ Submit a listing of this shell to your faculty member for grading.
Individual
Individual Forum
Day 7

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>POS</strong> <strong>420</strong> <strong>Week</strong> 3 <strong>Individual</strong> <strong>Linux</strong>® <strong>Script</strong> <strong>Worksheet</strong>Click Here to Buy the Tutorialhttp://www.uoptutorial.com/index.php?route=product/product&path=804&product_id=12226For more course tutorials visitwww.uoptutorial.com<strong>Individual</strong> Assignment· Copy the following shell that completes the following:#!/bin/bashecho Select a country from the follow-ing list:echo America, Italy, France, Germanyread countrycase $country in[Aa]merica ) echo Ford; echo Per-haps;;[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.· Answer the following questions:◦ What is the purpose of the echo command?◦ In the case statement, why are the first let-ters both caps andlower case?◦ What does esac mean?· Submit the answers to these questions to your faculty member


for grading.· Create your own shell that completes the fol-lowing 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 anice name too.◦ Submit a listing of this shell to your faculty member for grading.<strong>Individual</strong><strong>Individual</strong> ForumDay 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!