bug-bash
[Top][All Lists]
Advanced

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

with bash 3.2 from source: hashmarks inside backticks cause parse error


From: Tim München
Subject: with bash 3.2 from source: hashmarks inside backticks cause parse error
Date: Fri, 24 Oct 2008 08:54:53 +0200
User-agent: KMail/1.9.10

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation 
CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' 
-DCONF_MACHTYPE='i686-redhat-linux-gnu' -DCONF_VENDOR='redhat' 
-DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  
-I. -I./include -I./lib  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g 
-pipe -m32 -march=i386 -mtune=pentium4
uname output: Linux grid-ui.physik.uni-wuppertal.de 
2.6.9-67.0.4.EL_SFS2.3_0smp #1 SMP Mon Jul 21 13:57:38 CEST 2008 i686 i686 
i386 GNU/Linux
Machine Type: i686-redhat-linux-gnu

Bash Version: 3.2
Patch Level: 0
Release Status: release

Description:
        A script containing some commands including hashmarks inside a 
backtick operator fails to run correctly. The hashmark(s) seem to be 
interpreted in a way that treats the rest of the line as comment, causing the 
closing backtick to be skipped, and finally resulting in a unexpected EOF 
parse error.

        This behaviour only occurs using a bash (3.2) I compiled from source on 
my 
machine. I reproduced the problem on a 32bit- and on my 64bit-machine.

Repeat-By:
        Execute the following line:

        $ echo `seq -w 00 05 | sed -e 's# ##g'`

        The expected output is:

        0 1 2 3 4 5
        $

        In bash compilations showing the described problem, the output is 
instead:

        $ echo `seq -w 00 05 | sed -e "s# ##g"`
        >       (the bash is waiting for further input here... press CTRL+D)
        bash: unexpected EOF while looking for matching ``' 
        bash: syntax error: unexpected end of file
        $




reply via email to

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