bug-bash
[Top][All Lists]
Advanced

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

Re: case inside $(while true) misparsed


From: Chet Ramey
Subject: Re: case inside $(while true) misparsed
Date: Wed, 1 Nov 2017 09:59:04 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/1/17 7:04 AM, Kjetil Torgrim Homme wrote:

> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
> 
> Description:
>       I was bitten by earlier iterations of case selectors prematurely ending 
> an $()
> and my actual problem has been patched in the newest release (thanks!).  I 
> came across a
> degenerate case in my testing, though.
> 
> Repeat-By:
>       foo=$(while true; do case $HOME in /*) echo abs ;; esac; done)
>       bash: syntax error near unexpected token `;;'

Thanks for the report and test case. I'll take a look.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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