Configuration Information Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -march=nocona -O2 -pipe -mtune=generic uname output: Linux LFS 2.6.25.17 #7 SMP PREEMPT Tue Jan 20 22:40:20 MSK 2009 x86_64 Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz GenuineIntel GNU/Linux Machine Type: x86_64-unknown-linux-gnu
Bash Version: 4.0 Patch Level: 0 Release Status: release Description: Look at the following bash session: $ { echo a; } |& { read a; echo "read: $a"; } bash: syntax error near unexpected token `}' Expected behavior: $ { echo a; } |& { read a; echo "read: $a"; } read: a It works correctly with `2>&1 |' instead of `|&' or when the right side does not contain braces. For example: $ f() { read a; echo "read: $a"; } $ { echo a; } |& f read: a