multiplex input streams in a shell