Are parallel pipes feed by one process possible ?

leegold at speedymail.org leegold at speedymail.org
Tue Sep 14 21:11:29 MST 2010


Hi,

I want to do the following:

Btw, I don't know if & meaning I think run processes in background has
any effect on my question but it's there w/the actual commands so I'm
adding it. So one process runs and is piped into a second process.

$ process1 | process2 &

Is there a way I can pipe process1 into process3 (and still pipe into
precess2) ? So process1 runs and process2 and process3 run in parallel
both feed by process1. So like test.txt file w/content:

a

b

c

---
then

$ cat test.txt | grep a
$ a
$ cat test.txt | grep c
$ c

I want cat test.text to feed both greps at the same time and maybe get
output like:

$ac

I tried the tee command w/no luck. Is there a way to do this on one line
at one time? Thanks. using Ubuntu w/Bash. 

Lee


More information about the PLUG-discuss mailing list