[gnu.bash.bug] Brace yourself for a bug :-)

trost@reed.bitnet (Bill Trost,Box 607,ext 571,497) (01/22/90)

The command line
	{ sleep 3 ; /bin/echo foo } &
gets parsed as
	sleep 3 ; /bin/echo foo &

under bash 1.04 on our machines here.  /bin/sh interprets it as
	( sleep 3; /bin/echo foo ) &
if a semicolon is placed after "foo" (and passes "}" to echo
otherwise; i.e., "}" must come first on the command line to have its
meaning as a grouping symbol).

chet@cwns1.CWRU.EDU (Chet Ramey) (01/24/90)

In article <13925@reed.UUCP> trost@reed.bitnet (Bill Trost,Box 607,ext 571,497) writes:
>The command line
>	{ sleep 3 ; /bin/echo foo } &
>gets parsed as
>	sleep 3 ; /bin/echo foo &

I'd like to congratulate Bill for always coming up with the most interesting
bugs.  This one took a while.

The problem is not the parsing, but the execution (that is, the line is
parsed correctly, but the execution of group commands discards this kind of
background information).  I have sent a fix to Brian. 

Chet
-- 
Chet Ramey				"Can't you pay a grad student to 
Network Services Group			 read the manual for you?"
Case Western Reserve University			-- Bill Wisner,
chet@ins.CWRU.Edu				   	to Peter Honeyman