[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syntax error while parsing a case command within `$(...)'
From: |
Chet Ramey |
Subject: |
Re: syntax error while parsing a case command within `$(...)' |
Date: |
Mon, 22 Feb 2021 09:04:30 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 2/22/21 12:59 AM, Oğuz wrote:
21 Şubat 2021 Pazar tarihinde Chet Ramey <chet.ramey@case.edu
<mailto:chet.ramey@case.edu>> yazdı:
On 2/21/21 3:05 PM, Oğuz wrote:
With the latest push to devel bash now accepts `if ! [[ ... ]] then
:; fi' too, but not `:() ! [[ ... ]]'. Is `! [[ ... ]]' (or `time
[[ ... ]]') a valid compound command or not?
Technically not; they're pipelines.
So, if the last component of a pipeline is a compound command, a separator
between the pipeline and `then', `fi', `do', `done', or `esac' is optional,
It's really a reserved word that terminates a command that makes the
closing `esac' optional.
but a pipeline alone can not be a function body no matter what.
Correct. The POSIX grammar makes this fairly clear, its issues with
`rule 4' aside.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
- Re: syntax error while parsing a case command within `$(...)', (continued)
- Re: syntax error while parsing a case command within `$(...)', Andreas Schwab, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/18
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/21
- Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/21
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/22
- Re: syntax error while parsing a case command within `$(...)',
Chet Ramey <=
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/22
- Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/18
- Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/17