[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syntax error while parsing a case command within `$(...)'
From: |
Lawrence Velázquez |
Subject: |
Re: syntax error while parsing a case command within `$(...)' |
Date: |
Thu, 18 Feb 2021 01:11:59 -0500 |
> On Feb 17, 2021, at 10:27 PM, Dale R. Worley <worley@alum.mit.edu> wrote:
>
> Lawrence Velázquez <vq@larryv.me> writes:
>>>> `;;' is optional for the last case item.
>>>
>>> The manual page (for my version) says it's required. If, in some
>>> certain circumstances, it works without, that's nice.
>>
>> It's also required by POSIX.
>
> Ah, now that's different. Has the current man page been updated to
> match?
No.
https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#index-case
Bash has permitted omitting the final ;; since the beginning (more
or less). I assume the documentation omits that detail for a reason
-- perhaps to discourage its use.
vq
- Re: syntax error while parsing a case command within `$(...)', (continued)
Re: syntax error while parsing a case command within `$(...)', Dale R. Worley, 2021/02/14
Re: syntax error while parsing a case command within `$(...)', Eli Schwartz, 2021/02/14
Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/15