bug-bash
[Top][All Lists]
Advanced

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

Re: syntax error while parsing a case command within `$(...)'


From: Oğuz
Subject: Re: syntax error while parsing a case command within `$(...)'
Date: Sun, 14 Feb 2021 12:16:14 +0300

14 Şubat 2021 Pazar tarihinde Koichi Murase <myoga.murase@gmail.com> yazdı:

> 2021年2月14日(日) 15:41 Andreas Kusalananda Kähäri <andreas.kahari@abc.se>:
> > And using (x) doesn't help:
> >
> > % bash -c ': $(case x in (x) esac)'
> > bash: -c: line 1: unexpected EOF while looking for matching `)'
> > bash: -c: line 2: syntax error: unexpected end of file
>
> This is interesting. I think this is just an oversight. A quick fix
> like the attached patch should be fine. [ Note: The patch seems to
> work fine, but I haven't carefully read the code, so I'm not sure if
> this fix is really correct. ]
>

It seems to be on the right track but incomplete:

   $ ./bash -c '$(case x in x) ;; x) esac)'
  ./bash: -c: line 1: unexpected EOF while looking for matching `)'
  ./bash: -c: line 2: syntax error: unexpected end of file


-- 
Oğuz


reply via email to

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