top | item 29846560

(no title)

lnanek2 | 4 years ago

You can always setup some named pipes. E.g.:

mkfifo named_pipe

echo "Hi" > named_pipe &

cat named_pipe

I used to do this in bash scripts to keep them cleaner and the lines simpler.

discuss

order

azalemeth|4 years ago

Named pipes and tee (or gnu parallel, depending on the problem) make this semantically much clearer. It's so much better than bracket-and-sed-hell spread out over different lines.

gnubison|4 years ago

Where does sed come into this?

Too|4 years ago

How does error handling together with this work? Can pipefail catch this or does one explicitly need to ‘wait’ for the background processes and check them there?

cerved|4 years ago

Guessing that pipefail cares 0% of which filedescriptors are used and only the exit codes of processes