until [ -n "$name" ]; do
    echo -n "Please enter the your name: "
    read name
    checkname=`echo "$name" | grep ^[[:alnum:]]*$`
    if [ "$checkname" ]; then
        echo "var from read is ok"
    else
        echo "var from read is NOT ok"
        unset name
    fi
done


###  debug info below

+ '[' -n '' ']'
+ echo -n 'Please enter the your name: '
+ read name
++ echo ASDF
++ grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
+ checkname=
+ '[' '' ']'
+ echo 'var from read is NOT ok'
+ unset name
