cd ~/it244/ex
mkdir ex25
cd ex25
case
nano
, or your favorite editor, create the script
case.shchmod 755 case.sh
./case.sh Enter A, B, or C: A You entered A or a Exiting program ./case.sh Enter A, B, or C: B You entered B or b Exiting program ./case.sh Enter A, B, or C: C You entered C or c Exiting program ./case.sh Enter A, B, or C: D You did not enter A, B, or C Exiting program
select
nano
, or an editor of your choice, create
select.shchmod 755 select.sh
./select.sh 1) apple 2) banana 3) blueberry 4) orange 5) STOP Choose your fruit: 1 You chose apple That is choice number 1 Choose your fruit: 2 You chose banana That is choice number 2 Choose your fruit: 3 You chose blueberry That is choice number 3 Choose your fruit: 4 You chose orange That is choice number 4 Choose your fruit: 5 About to leave Exiting program
chmod 755 here.sh
./here.sh Boston Here is the information you requested: Boston Red Sox ./here.sh Rays Here is the information you requested: Tampa Bay Rays ./here.sh Orio Here is the information you requested: Baltimore Orioles