bug-coreutils
[Top][All Lists]
Advanced

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

Re: head -1 fails with _POSIX2_VERSION=200112


From: Eric Blake
Subject: Re: head -1 fails with _POSIX2_VERSION=200112
Date: Tue, 20 Sep 2005 13:29:08 +0000

> dixsept:~> _POSIX2_VERSION=200111 head -1 /dev/null
> dixsept:~> _POSIX2_VERSION=200112 head -1 /dev/null
> head: `-1' option is obsolete; use `-n 1'
> Try `head --help' for more information.
> zsh: exit 1     _POSIX2_VERSION=200112 head -1 /dev/null
> 
> I do not think this is a good idea to fail on the old form, as
> it is still useful, at least with an interactive shell.

This behavior has been changed in CVS coreutils.  Whenever
5.3.1 is released, _POSIX2_VERSION=200112 head -1 will
do what you are asking for.  However, portable scripts cannot
rely on this behavior, as it is no longer mandated by POSIX (and,
as you note, released versions of coreutils reject it), so you may
want to consider fixing your scripts to be portable anyway.

--
Eric Blake






reply via email to

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