On 9/11/12 10:50 AM, Benoit Vaugon wrote:
> Description:
> Cannot use "case" construction in a "for" loop in a $() sub shell.
> Should work but produces parsing error.
>
> Repeat-By:
> echo $(for x in whatever; do case y in *) echo 42;; esac; done)
Thanks for the report. This will be fixe
On Tuesday, September 11, 2012 05:31:36 PM Steven W. Orr wrote:
> On 09/11/12 17:20, quoth Chris F.A. Johnson:
> > On Tue, 11 Sep 2012, Benoit Vaugon wrote:
> > ...
> >> Description:
> >> Cannot use "case" construction in a "for" loop in a $() sub shell.
> >> Should work but produces parsing erro
On 09/11/2012 03:31 PM, Steven W. Orr wrote:
>>> Fix:
>>> Probably by fixing the bash parser.
>>
>> Balance the parentheses in the case statement:
>>
>> echo $(for x in whatever; do case y in (*) echo 42;; esac; done)
>>
>
> Thanks. I didn't know that the opening paren was optional and was ne
On 09/11/2012 08:50 AM, Benoit Vaugon wrote:
> Bash Version: 4.1
> Patch Level: 7
> Repeat-By:
> echo $(for x in whatever; do case y in *) echo 42;; esac; done)
The syntax error is still present in bash 4.2 patchlevel 37:
$ echo $(for x in whatever; do case y in *) echo 42;; esac; done)
bash
On 09/11/12 17:20, quoth Chris F.A. Johnson:
On Tue, 11 Sep 2012, Benoit Vaugon wrote:
...
Description:
Cannot use "case" construction in a "for" loop in a $() sub shell.
Should work but produces parsing error.
Repeat-By:
echo $(for x in whatever; do case y in *) echo 42;; esac; done)
On Tue, 11 Sep 2012, Benoit Vaugon wrote:
...
Description:
Cannot use "case" construction in a "for" loop in a $() sub shell.
Should work but produces parsing error.
Repeat-By:
echo $(for x in whatever; do case y in *) echo 42;; esac; done)
The closing parentheses in the case statement i
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPA