two script problems

i have two problems with my phone book script the first i want to only allow a valid name if it has letters and spaces not a number in the name. so "joe smith" is ok "joe smith1" is not ok.

the second problem is how can i cut a name out of a txt file i have this as my test txt file
joe blogs 12345678
smith peter 43667843
joe smith 54329875
david cooper 78564429
peter cooper 89975563

now how do i search the txt file and only remove the one line say joe smith and not the other smith.

im entering the info into the script with positional paramiters so to run my script i use ./book.sh "joe smith"
hope someone can help me here im loving learning linux scripting :slight_smile: thankyou for any help you can give me.

name="Joe Smith"
case $name in
     *[!a-zA-Z ]*) echo invalid name ;;
     *) echo OK ;;
esac
name='joe smith'
grep -v "$name" FILENAME

thank you for your reply cfajohnson but joe smith was just a example of input to run the script ./book.sh i want to be able to add any name or number to the ./book.sh script so i am not sure how to change your idea so i can use positional paramiters to run the script $1 $2 for name and number.

name=$1
grep -v "$name" FILENAME