There are a few possible answers to this, but in the particular case where one shell script calls another program or script at the end, the answer is easy. Use exec: #!/bin/bash # Do stuff here ... # ...
One of the new features in bash 4.0 is the coproc statement. The coproc statement allows you to create a co-process that is connected to the invoking shell via two pipes: one to send input to the ...