bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash-4.0: parser complains on `|& {}' statement


From: Evgeniy Zhemchugov
Subject: bash-4.0: parser complains on `|& {}' statement
Date: Tue, 24 Feb 2009 21:16:34 +0300

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]