Answers for "bash uppercase string"

0

how to compare a character to uppercase in bash script

echo "enter a char"
read c

if [[ $c == [A-Z] ]];
then
    echo "upper"
elif [[ $c == [a-z] ]];
then
    echo "lower"
else 
    echo "Digit or special symbols!"
fi
Posted by: Guest on June-08-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language