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
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..