I am trying to make a script to check if the argument has one uppercase or lowercase letter, or if something else (digit or word, for example.)
So far this has been done:
if echo $1 | egrep -q '[AZ]'; then echo "Uppercase"; elif echo $1 | egrep -q '[az]'; then echo "Lowercase"; else echo "FAIL"; fi
It is necessary to make him dump me not only if it is not a letter, but if I insert a word or 2 letters.
source share