describe="it's a describe by yourself"

if echo "$describe" | grep -q '^[a-zA-Z0-9]\+$'; then
echo "ok"
else
echo "invalid"
fi

  

describe="it's a describe by yourself"

if echo "$describe" | grep -q '[^a-zA-Z0-9]'; then
echo "invalid"
fi

  

05-11 11:31