bug-coreutils
[Top][All Lists]
Advanced

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

Re: POSIX misunderstanding


From: Paul Eggert
Subject: Re: POSIX misunderstanding
Date: Wed, 18 Aug 2004 10:49:30 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Albert Cahalan <address@hidden> writes:

> Well, so does the --lines option.

No, that uses an allowed extension.  It's not prohibited, the way that
multi-digit options are prohibited.

> I think "violates" is too strong of a word for
> anything called "Guidelines", but anyway...

The standard says:

  The utilities in the Shell and Utilities volume of IEEE Std
  1003.1-2001 that claim conformance to these guidelines shall conform
  completely to these guidelines as if these guidelines contained the
  term "shall" instead of "should".

So it's a hard requirement for (most) standard utilities.

> Guideline 11 isn't even a problem at all, unless you
> artificially make it a problem.

Sure it is.  It says that order shouldn't matter unless the options
are mutually exclusive and one is documented to override the other.
Hence if options like "-1" are and "-3" are allowed, then "-13" must
be equivalent to "-1 -3" which in turn should be equivalent to "-3 -1"
or "-31".  I suspect that this problem is part of the reason that
multi-digit options were disallowed.

>    "On some implementations, the utilities accept
>    usage in violation of these guidelines for
>    backwards-compatibility as well as accepting
>    the required form."
>
> Well, there you go. The POSIX and UNIX standard
> explicitly allows for the traditional behavior.

That is a warning that some implementations don't conform to the
standard.  It's certainly not a license to do whatever you want to do,
and then still claim conformance.

> Nearly everybody wants conformance.

If nearly everybody wanted conformance, it wouldn't be much of a problem
(since almost nobody would be using nonstandard commands like "tail -10" :-).

But at any rate it's easy to configure this, both at build-time and at
run-time.  If your coreutils installation isn't configured the way you
like, just change it.




reply via email to

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