LAB 46: THE select LOOP

 <  Day Day Up  >  

LAB 46: THE select LOOP

  1. Write a script that will do the following:

    1. Provide a comment section at the top of the script, with your name , the date, and the purpose of this program.

    2. Use the select loop to provide a menu of foods . The output will resemble the following:

       $  foods   1) steak and potatoes   2) fish and chips   3) soup and salad   Please make a selection. 1   Stick to your ribs   Watch your cholesterol   Enjoy your meal.  $  foods   1) steak and potatoes   2) fish and chips   3) soup and salad   Please make a selection. 2   British are coming   Enjoy your meal.  $  foods   1) steak and potatoes   2) fish and chips   3) soup and salad   Please make a selection. 3   Health foods...   Dieting is so boring.   Enjoy your meal.  $  foods   1) steak and potatoes   2) fish and chips   3) soup and salad   Please make a selection. 5   Not on the menu today!  

  2. Rewrite the lookup script using the select command to create a main menu and a submenu. The menu will resemble the following:

     1) Add Entry 2) Delete Entry 3) Update Entry 4) View Entry      a) Name      b) Phone      c) Address      d) Birthday      e) Salary 5) Exit 

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net