Skip to main content
2 of 2
deleted 224 characters in body

This solution uses a named pipe. Shells compatible with Bourne's should have no problem with it.

fifo=${TMPDIR-/tmp}/$(basename "$0")-$$-foo-bar
mkfifo -m u=rw,go= "$fifo" || exit

foo > $fifo &
bar < $fifo 
rm -f "$fifo"

wait $!