I want to execute a process with exevcp (let's say ls -l). I want the output of that to go to the input of more than one process. I don't if that is possible with pipes. Can someone help me ?
Asked
Active
Viewed 272 times
0
-
You may need to create a memory queue to keep the output and develop an API to feed the input to multiple processes. – Steephen May 15 '17 at 01:51
-
Check out how `tee` works: http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tee.c – user58697 May 15 '17 at 03:38
-
using the shell, in linux, you can use `tee` – user3629249 May 16 '17 at 07:26
1 Answers
1
Looking at how tee
works, as suggested in the comments, might be the way to go. However, for simplicity, why not use a shell and tee itself wrapped around your process?
your_process | tee >(process1) >(process2)
For reference: OS X / Linux: pipe into two processes?