I want to run a series of piped commands which do a lot of audioprocessing. It looks as follows in pseudocode:
command1 | command2 | command3
Of command2 and command3, both take the output of the previous command as input (regular stdin/stdout behaviour).
Now I'd like to execute another command1.1 right after command1, which is in no way connected to the running pipe between command1 and command2, except for it must not be run before command1 has completely finished.
command1 [; after that run command1.1, even if command2 and command3 are still busy] command2 command3
However I have no idea how to do this in bash. I've tried tee, but that makes the command to be run as soon as the pipe is constructed. Any ideas?
Thanks!
Best Answer
You can redirect it to a subshell.
Another way is to create a named pipe fifo.
A script should be similar to