On 10/14/12 7:26 AM, Dan Douglas wrote:
> On Sunday, October 14, 2012 11:46:17 AM Wladimir Sidorenko wrote:
>> To my mind '!' looks pretty much like a unary operator and '|' like a binary 
> one.
> 
> This isn't as confusing as the associativity and nesting problem.

Think of `!' and `time' as reserved words that modify a pipeline rather
than operators that begin one.  You can stack `!' and `time' so that
consecutive instances modify the same pipeline rather than delimit them.
It's a little easier to see how ! ! is a no-op that way.

There was an extensive discussion of this on the Posix list back a
couple of years.  Geoff Clare wrote the final version of a set of
proposed changes that made a distinction between pipelines, `unadorned'
pipelines, `negated' pipelines, `timed' pipelines, and allowed the `!'
and `time' reserved words to modify the same pipeline.  I'm not sure why
a lot of that work didn't make it into the published standard, but it
was clarifying.

https://www5.opengroup.org/sophocles2/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=12082

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to