bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep recurse fails


From: Dave B
Subject: Re: grep recurse fails
Date: Tue, 13 Oct 2009 09:37:32 +0100
User-agent: KMail/1.11.4 (Linux/2.6.28-15-generic; KDE/4.2.4; x86_64; ; )

On Tuesday 13 October 2009, Eric Blake wrote:

> According to Dave B on 10/12/2009 9:22 AM:
> > with "should" interpreted as "shall" as explained later. But then what's
> > the meaning of rule 14, and how would that be supposed to be enforced
> > when POSIXLY_CORRECT is set? It would seem to be clashing with 9.
>
> POSIX rules only hold when POSIXLY_CORRECT is set.  Rule 14 states that:
>
> foo -b -ar
>
> should be recognized as
>
> foo -b -a -r
>
> and not
>
> foo -b ./-ar
>
> if all of -b, -a, and -r are recognized options (historically, not all
> utilities followed this rule: for example, 'set -vx' behaved differently
> than 'set -v -x'). 

Ah, then my interpretation was different. I read it as meaning that

foo -b blah -r

should be interpreted as

foo -b -r blah

or even as 

foo -br blah

if -b and -r are valid options. But then I was wrong.

> Rule 9 states that, when complying with POSIX:
>
> foo a -b
>
> will be treated like
>
> foo a ./-b
>
> even though -b is recognized.  There is no conflict between 9 and 14.  But
> GNU Coding Standards recommend that, unless reorganizing arguments will
> break the tool's semantics (think xargs, env, sudo), then reorganizing is
> in the user's favor, so:
>
> foo a -b
>
> is treated like
>
> foo -b a

Ah, so that's a GNU thing. Thank you very much for the clarification.

-- 
D.




reply via email to

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