Package: bash
Version: 4.0-7
Severity: normal

Bash (no longer) parses correctly a mix of $(), here documents and
pipes (I could not narrow it down).
Take an innocent script
$ cat test.sh 
echo $(cat << EOF | wc -l
1
2
3
EOF
)

This yields a parsing error:
$ bash test.sh 
test.sh: line 1: unexpected EOF while looking for matching `)'
test.sh: line 7: syntax error: unexpected end of file

(Notice that dash succeeds as hoped)
$ dash test.sh 
3


Stranger: if the path is given for the command after the pipe, this
succeeds.
$ cat test2.sh 
echo $(cat << EOF | /usr/bin/wc -l
1
2
3
EOF
)
$ bash test2.sh 
3

Best regards
Samuel Hym

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i586)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=ANSI_X3.4-1968) 
(ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages bash depends on:
ii  base-files                5.0.0          Debian base system miscellaneous f
ii  dash                      0.5.5.1-3      POSIX-compliant shell
ii  debianutils               3.2.1          Miscellaneous utilities specific t
ii  libc6                     2.9-27         GNU C Library: Shared libraries
ii  libncurses5               5.7+20090803-2 shared libraries for terminal hand

Versions of packages bash recommends:
ii  bash-completion               1:1.1-1    programmable completion for the ba

Versions of packages bash suggests:
pn  bash-doc                      <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to