Can someone please explain how these process substitutions are working.
(echo "YES")> >(read str; echo "1:${str}:first";)> >(read sstr; echo "2:$sstr:two")> >(read ssstr; echo "3:$ssstr:three")
Output
1:2:3:YES:three:two:first
I've figured out, that the 'ssstr'-Substitution got FD 60, sstr FD 61 and str FD 62. (right to left)
But how is (echo "YES") connected to input of FD60, and output of FD60 with input FD61 and so on and finally FD62 prints out on Terminal ?
All against the direction of the two redirections.
How are they nested, and how connected ? Makes me crazy. Ty.