This question is about pipes, and I have created a small problem to illustrate my issue. Suppose I have a file:
// foo.csv a,b,c d,e,f
bar.sh, I do the following:
A=`mktmp -u` B=`mktmp -u` mkfifo $A mkfifo $B cat foo.csv | tee $A > $B paste -d ',' <(cat $A) <(cat $B) rm $A $B
I expect the following output:
Instead, the program hangs due to pipes continuing to listen for more input.
How do I implement this pattern as concisely and simply as possible?