I have a script library that uses a lot of exit commands if some condition occurs. Each time an exit is hit, the shell is closed.
I saw many answers regarding this question that suggest changing the script, but my scripts are 3rd party and I assume the authors didn't mean that the shell should close so I assume there is some other way to run.
How do I run these script so that only the script stops but the shell remains open. Currently I use . script.sh.
. script.sh?!./script.shwould do exactly what you want.