bug-bash
[Top][All Lists]
Advanced

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

commented quotes in subshells cause syntax errors


From: Mike Frysinger
Subject: commented quotes in subshells cause syntax errors
Date: Fri, 14 Apr 2006 19:07:57 -0400
User-agent: KMail/1.9.1

not a regression as bash-2.05 / bash-3.0 also barf on this ... i imagine 
someone has already filed this, but i couldnt seem to find it in the mailing 
lists ...

foo=$( #'
echo hi)

now the neat thing is that with bash-3.1 (unlike older versions), the 
open/close parens are detected properly when typing the example code into a 
terminal:

bash-3.1 $ foo=$(#"
> )
bash: bad substitution: no closing `)' in $(#"
)

bash-3.0 $ foo=$(#"
> )
> 
> bash-3.0: unexpected EOF while looking for matching `"'
bash-3.0: syntax error: unexpected end of file

notice how bash-3.0 keeps wanting more input until i hit ctrl+d ... almost 
there ! :)
-mike




reply via email to

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