When I use break in an if loop in bash it tells me its not valid for bash, what can I use instead?
The use case is, the user is asked a question and if he answers 'no', the script should skip to the next section.
if [[ $ans1_1 = "y" ]]; then
fedoraDeps
elif [[ $ans1_1 = "n" ]]; then
break
else
echo "Answer 'y' or 'n' "
fi