标签: bash if-statement conditional
read a if [[ $a != 'A' || $a != 'a']] && [[ $a != 'B' || $a != 'b' ]] && [[ $a !='C' || $a != 'c']]; then echo "ABC only" fi
答案 0 :(得分:0)
read -rN1 a if [[ "$a" =~ [^AaBbCc] ]]; then echo "ABC only" fi