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

[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:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
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
-----BEGIN PGP SIGNATURE-----
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/

iEYEARECAAYFAkrT56wACgkQ84KuGfSFAYC58ACgybfJd6tC4PuHrAHsVby5bY69
yNAAoJ+ENtCMIZPZ/69jhvULWACDMLLE
=VsZ8
-----END PGP SIGNATURE-----




reply via email to

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