On 2/22/21 12:59 AM, Oğuz wrote:
21 Şubat 2021 Pazar tarihinde Chet Ramey <chet.ra...@case.edu
<mailto:chet.ra...@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 c...@case.edu http://tiswww.cwru.edu/~chet/