How can I break out of a while loop, from within a nested case statement?
In the case where the user entered "y", you can exit both while and case:
break [n]
Exit from within a for, while, until, or select loop. If n is
specified, break n levels. n must be ≥ 1. If n is greater than
the number of enclosing loops, all enclosing loops are exited.
The return value is 0 unless n is not greater than or equal to
1.
In your case, you want to do break 2
.