Hi guys, I'm learning how to use bash to write my first script for college, but I'm having trouble with nested statements/loops/functions. I'm trying to write an if statement where if a variable value is true, it breaks/returns out of that if statement, then also breaks out of a containing while loop, that is also part of a function, that I want to end (when the if statement's variable is true).
I've tried return N, break N, and exit (I know know this just ends the script.)
Can anyone shed any knowledge on how this should work please?