It should be ok if you use both tee
and mkfifo
.
mkfifo pipe
cat pipe | (command 1) &
echo 'test' | tee pipe | (command 2)
More Related Contents:
- Get exit code from subshell through the pipes
- How can I pipe stderr, and not stdout?
- Pipe output and capture exit status in Bash
- How to trick an application into thinking its stdout is a terminal, not a pipe
- What is a simple explanation for how pipes work in Bash?
- How to pipe input to a Bash while loop and preserve variables after loop ends
- How can I detect if my shell script is running through a pipe?
- Bash variable scope
- Capture stdout to a variable but still display it in the console
- Why piping input to “read” only works when fed into “while read …” construct? [duplicate]
- Capture both stdout and stderr in Bash [duplicate]
- Piping and Redirection
- How to get the PID of a process that is piped to another process in Bash?
- How to pipe multiple commands into a single command in the shell? (sh, bash, …)
- Pipe, standard input and command line arguments in Bash
- How to pipe stdout while keeping it on screen ? (and not to a output file)
- pipe stdout and stderr to two different processes in shell script?
- bash piping prevents global variable assignment
- How to detect if a Node.js script is running through a shell pipe?
- What’s the difference between “here string” and echo + pipe
- Left side of pipe is the subshell?
- Batch equivalent of Bash backticks
- Running script upon login in mac OS X [closed]
- Command substitution: backticks or dollar sign / paren enclosed? [duplicate]
- Set a parent shell’s variable from a subshell
- How to silence output in a Bash script?
- How to find/replace and increment a matched number with sed/awk?
- chmod WSL (Bash) doesn’t work
- How to zero pad numbers in file names in Bash?
- How to properly nest Bash backticks