How to exit from all nested shell script calls once in a single command?

  • 1
    If I understand the question correctly, you can't (except via something like kill). One process (e.g. a subprocess running a nested script) cannot tell other processes (e.g. its parents) what to do. Mind you, you could exit the subprocess with an error status and write all the calling scripts to exit when the child script exits with an error, but this has to be written into all of the scripts. – Gordon Davisson Jul 21 '20 at 3:35
  • 1
    @GordonDavisson That seems like an answer. Would you be willing to post it (or something like it) as one? – Eliah Kagan Jul 21 '20 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.