View Single Post
Old 4th February 2008, 17:02
anything anything is offline
Junior Member
Join Date: Feb 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Phone Shell Script ?

guys I truly need the solution of this, with some explanation !

script (called phone) that creates a simple telephone list (create an empty file called “phonlist” in home directory) . Each line in this file consist of two fields name and the phone number, the script should do the following:
When user types the command : “phone new <name> <number>” this will add new record (name,number) to the list.
When user type command: “phone <name>” then the script should search in the file “phonelist” and gets the phone number and display the result.

and what does these commands do:

[[ -z $user ]]



-eq 1 0

[[ `grep -c $user` -eq 1 ]]


Reply With Quote
Sponsored Links