Need help to Simplfy

while  [[ "$vrfy" != "true" && "$vrfy2" != "true" ]];
    do
            echo "ID format - 000-000-000"
            read -p "Enter Name: " usrnme
            read -p "Enter ID: " id
        if echo $usrnme | grep "^[A-Za-z]" > /dev/null 
            then
                 vrfy="true"
        else
            until [ "$vrfy" = "true" ];
                do
                        echo "Re-enter name"
                           read -p "Enter Name: " usrnme
                            if echo $usrnme | grep "^[A-Za-z]" > /dev/null
                                 then
                                     vrfy="true"
                            fi
                       done
         fi

     if echo "$id" | grep "^[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9]$" > /dev/null
             then
                 vrfy2="true"
         else
         until [ "$vrfy2" = "true" ];
                do
                        echo "format 000-000-000"
                        read -p "Enter ID: " id
                             if echo "$id" |  grep "^[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9]$" > /dev/null
                                 then
                                     vrfy2="true"
                            fi
                    done
        fi      
done

here my portion of my code i having trouble to compress it
i feel that i can do the same task in smaller amount of lines
but i haven't figured out how

Here's a piece of it. Replacing lines 4-19:

        until [ "$vrfy" = "true" ];  do
                read -p "Enter Name: " usrnme
                echo $usrnme | grep -q "^[A-Za-z]"  &&  vrfy="true"
        done

Hi,

you could use this for the second part. This way you save two external
processes and a number of lines.

while [[ $vrfy2 != true ]]
do
    if [[ "$id" == [0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9] ]] 
    then 
        vrfy2=true 
    else 
        read -p "Enter ID in format 000-000-000: " id 
    fi
done

HTH Chris