Getting started with conditionals

  • + 0 comments
    read ch
    case $ch in
        [yY])
            echo "YES"
            ;;
        [nN])
            echo "NO"
            ;;
    esac