bug-textutils
[Top][All Lists]
Advanced

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

Re: Head -n argument position matters


From: Jim Meyering
Subject: Re: Head -n argument position matters
Date: Sat, 20 Apr 2002 10:43:51 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu)

Edward Avis <address@hidden> wrote:
> On Sat, 20 Apr 2002, Jim Meyering wrote:
>
>>That's the expected behavior, because options like `-1'
>>are obsolete.
>
>>  $ env _POSIX2_VERSION=200112 head -1
>>  head: `-1' option is obsolete; use `-n 1'
>
> Yikes!  There sure are some crazy things going on in Posixland...
>
> But surely in the current version of head, if -1 is accepted at the
> start it should be accepted at the end too - for consistency with other
> options.

Sorry, but this isn't anything new.
Even 10 years ago, POSIX called options like `-1' (and `-666' :-)
obsolescent, and tools like getopt don't treat them the same
way as regular options.

Actually, it's all in the interests of consistency: for example,
options like comm's -1, -2, and -3 are ok, but options like
head's -N (where N is a positive integer) are not.



reply via email to

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