Mistři v programování na #hovnokod

Bash #4659

Proč to udělat jednoduše když to de složitě :D

OPTIONS=("Install" "Update" "Delete" "PW Rese" "Quit")
select OPTION in "${OPTIONS[@]}"; do
  case "$REPLY" in
  1 | 2 | 3 | 4) break ;;
  5) errorQuit ;;
  *) errorContinue ;;
  esac
done
##
if [ "$OPTION" == "Install" ]; then
  INSTALL="Inst"
elif [ "$OPTION" == "Update" ]; then
  INSTALL="Updt"
elif [ "$OPTION" == "Remove" ]; then
  INSTALL="Rem"
elif [ "$OPTION" == "PW Reset" ]; then
  INSTALL="Res"
fi
##
if [ $INSTALL == "Inst" ]
    echo ""
elif [ $INSTALL == "Updt" ]; then
   echo ""
elif [ $INSTALL == "Rem" ]; then
   echo ""
elif [$INSTALL == "Res"]; then
   echo ""
fi

Anonymous,