|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
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”
Last edited by jim mcnamara; 04-25-2012 at 04:22 PM.. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Please repost in the Homework Forum. There are special rules for posting homework.
|
| Sponsored Links | ||
|