I have written the following script and found out that the enter button has the same function as entering "No". How can I make it, that the enter button has no effect on the script ?
weiter_mit_func()
{
printf "Script fortsetzen (y/n): "
read -n 1 ANTWORT
if [ "x$ANTWORT" = "xY" -o "x$ANTWORT" = "xy" ]
then
echo "Info: Aktion wird weitergeführt!"
else
echo "WARNING: Aktion vom Benutzer abgebrochen!"
exit 100
export GLOBAL_ERROR=100
unset OPT_LISTE
fi
}
weiter_mit_func