Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [coprocesses]

The tag has no usage guidance.

0
votes
1answer
20 views

How does bash coprocess achieve its pipelining?

Note this passage from man bash ( emphasis mine ): Coprocesses A coprocess is a shell command preceded by the coproc reserved word. A coprocess is executed asynchronously in a subshell, as ...
1
vote
2answers
139 views

Is coproc <command> the same as <command> &? [duplicate]

I have read that $coproc < command > is different from $< command > & in that coproc will execute command in a sub-shell process. But when I tested it, it worked just like $< ...
-3
votes
2answers
152 views

inter process comunication in bash read commands in multiple background functions

I'm trying to get the following code to read from a main input then read that in one function then be able to send that into the input of another function but i am having trouble getting it to work ...
3
votes
0answers
94 views

Why does this gawk coprocess hang?

While having a go at Convert date in bash shell, I tried GNU awk's coprocess feature: gawk -F, -v cmd='date +"%Y-%m-%d %H:%M:%S" -f-' '{print $5 |& cmd; cmd |& getline d; $5 = d}1' foo This ...
5
votes
1answer
127 views

Joined pipelines

Considering a routine such as this one: alpha() { echo a b c |tr ' ' '\n'; } which outputs a stream, I would like to take the output stream, transform it, and paste it with the original output ...
68
votes
4answers
19k views

How do you use the command coproc in various shells?

Can someone provide a couple of examples on how to use coproc?