Hello I am interested in how to pass stdout twice to the same command...
For instance, If I run the following:
seq 5 >a
tac a >b
paste a b
then I get:
1 5
2 4
3 3
4 2
5 1
The following also deliver the same result:
paste <(seq 5) <(seq 5 |tac)
or
seq 5 | paste - <(seq 5 |tac)
I want to use seq 5 only once - perhaps similar to these attempts, which do not work:
seq 5 | paste - <(tac -)
or
seq 5 | tee >(tac 1>&3) | paste - >(3>&1 cat)
I expect some kind of file descriptor manipulation or further process substitution magic will do the trick but I am having trouble getting there.