I remember vaguely a technique using pipes for communication between two shell processes.
Are there any tutorials available on how to setup and control a subshell?
I remember vaguely a technique using pipes for communication between two shell processes.
Are there any tutorials available on how to setup and control a subshell?
Did you take a look at the Advanced Bash Scripting guide?
There's an entire chapter about - surprise surprise - subshells.
This should get you going, examples are in C, but the same technique applies to bash. Just do a search for named pipes, in google or here, alot of examples specific to bash pops up.
Are you talking about named pipes?
mkfifo pipe
ls -l >pipe #type this is one shell
cat <pipe #type this is another one
No one reads if no one writes.
No one writes if no one reads.
I think you want coprocesses. In bash 4 there is a new builtin "coproc".
See here for examples: