Please help!!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Please help!!
# 1  
Old 04-25-2012
Please help!!

hi i have one question, i need its answer as soon as possible. please help me!.
the script should work on bash.


Q Write a script which will provide the following command line options:

-a Add a new entry
-r Remove an entry by contact name (You must confirm before removing)
-x Remove an entry by phone number (You must confirm before removing)
-l List a phone number given a name

If the user does not enter an option or an invalid option, make sure to notify appropriately.


Based on the selected entry, a file called “phonebook” in the current user’s home directory will be modified accordingly. Following is a sample of the file
phonebook
Alice Chebba
973-555-2015
Barbara Swingle
201-555-9257
Liz Stachiw
212-555-2298
Susan Goldberg
201-555-7776
Susan Topple
212-555-4932
Tony Iannino
973-555-1295


Sample command for adding a new entry:
Script.sh -a “John Hanson” 345-384-9384

Sample command for removing an entry by name:
Script.sh -r “Susan Topple”

Sample command for removing an entry by number:
Script.sh -x 212-555-2298

Sample command for listing a number by using a name:
Script.sh -l “Liz Stachiw”

Moderator's Comments:
Mod Comment Closed. Please repost in Homework Forum

Last edited by jim mcnamara; 04-25-2012 at 05:22 PM..
# 2  
Old 04-25-2012
Please repost in the Homework Forum. There are special rules for posting homework.
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question