swizzle() { fd0=0 fd1=1 exec {stdin}<&$fd0 exec {stdout}>&$fd1 } swizzle echo $stdin $stdout read line <&$stdin <&$stdout type swizzle exit 0