0x90
0
Q:

bash uppercase string

Just use tr command to transform lowercase letters into uppercase as:
tr a-z A-Z < file.txt	#transforms letters into uppercase in a file
echo 'HELLO' | tr A-Z a-z	#Outputs: 'hello'
0
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
0

New to Communities?

Join the community