Re: case inside $(while true) misparsed

2017-11-01 Thread Chet Ramey
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

Re: case inside $(while true) misparsed

2017-11-01 Thread Gniourf
Hi, How is the parser supposed to know that the closing parenthesis in */) is supposed to match the opening $( or not? This should work, though: foo=$(while true; do case $HOME in (/*) echo abs ;; esac; done) Best, - GG. On 11/01/2017 12:04 PM, Kjetil Torgrim Homme wrote: Configuration I

case inside $(while true) misparsed

2017-11-01 Thread Kjetil Torgrim Homme
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/opt/bash/share/