ich einfach Hexe Fall erstellt werden soll, in dem ich Funktionen basierend auf Benutzer ausführen kann aufgefordert werden:Fehler in Bash-Skript Schaltergehäuse
echo Would you like us to perform the option: "(Y|N)"
read inPut
case $inPut in
# echoing a command encapsulated by
# backticks (``) executes the command
"Y") echo 'Starting.....'
donwload_source_code
# depending on the scenario, execute the other option
# or leave as default
"N") echo 'Stopping execution'
exit
esac
Aber wenn ich das Skript ausführen, bekomme ich Fehler:
Would you like us to perform the option: (Y|N)
n
run.sh: line 27: syntax error near unexpected token `)'
run.sh: line 27: `"N") echo 'Stopping execution''
EMP-SOF-LT099:Genesis Plamen$
Dow wissen Sie, wie ich dieses Problem beheben kann?
Sie müssen case-Anweisungen brechen mit '' ;; – 123