Answers for "linux bash case insensitive string compare"

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
0

change bash suggestions to be case insensitive

# If ~/.inputrc doesn't exist yet: First include the original /etc/inputrc
# so it won't get overriden
if [ ! -a ~/.inputrc ]; then echo '$include /etc/inputrc' > ~/.inputrc; fi

# Add shell-option to ~/.inputrc to enable case-insensitive tab completion
echo 'set completion-ignore-case On' >> ~/.inputrc
Posted by: Guest on January-02-2022

Code answers related to "linux bash case insensitive string compare"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language