Now I have programs A and B. I want to redirect A's stdout to B's stdin, and B's stdout to A's stdin using bash.
I saw someone doing this, but they didn't explain how they did it.
Any suggestions?
Upd: I found a script which can accomplish this task, but I don't understand why:
{ ./A < /dev/fd/3 | ./B 3>&-; } 3>&1 | :