[Top][All Lists]

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

Re: grep recurse fails

From: Eric Blake
Subject: Re: grep recurse fails
Date: Mon, 12 Oct 2009 20:36:28 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090812 Thunderbird/ Mnenhy/

Hash: SHA1

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').  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

Finally, both POSIX and GNU Coding Standards state that:

foo -- -bar a

is treated like

foo ./-bar a

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


reply via email to

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