💡 TIP: On a Linux system using bash, you can compare text strings without worrying about upper or lowercase by using the ,, (lowercase) or ^^ (uppercase) parameter expansion modifiers e.g. EDITION=CommUNITY if [[ ${EDITION,,} = community ]]; then echo "Community" fi ${EDITION,,} converts the value to lowercase. #ZikTIPs #bash #scripting #linuxtips #techtips #feditips #Linux #opensource
💡 On a Linux system using bash, you can case insensitively compare text by using ,, (lowercase) or ^^ (uppercase) parameter expansion modifiers e.g.
EDITION=CommUNITY
if [[ ${EDITION,,} = community ]]; then
echo "yes"
fi
${EDITION,,} converts value to lowercase
#ZikTIPs #techtips #Linux #opensource