Hi

I have a file like this:
FirstName LastName:Address:Phone number
Using the : as delimiter
I want to add users to this file with the same info. how do i check if there is repetition?
just for the first name. i realized grep uses white space as delimiter.. but the full name with always have a white space!
i stored the full name in the variable FNAME
like this:
echo "Enter full name"
read FNAME
if [ -n "FNAME" ] then -- this means FNAME is not empty
for FN in `grep $FNAME in userinfo.txt | awk -F: '{print $1}'`
....
BODY
....
anyways, this will never be true for the grep part coz it treats the space as a different thing. and i want the full name
so i tried using two variables
FNAME for firstname and LNAME for lastname
...
...
for FN in `grep $FNAME?$LNAME.....` ......
or
for FN in `grep $FNAME[:space:]$LNAME ...`
or
for FN in `grep $FNAME[[:space:]]$LNAME ...`
or using double and single quotes in
for FN in `grep "$FNAME?$LNAME" ...` or '$FNAME?$LNAME '
all don't work.. HELP PLEASE
VERY MUCH APPRECIATED