bug-coreutils
[Top][All Lists]
Advanced

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

Re: Coretutils tail command no longer correctly accepting +2 as a parame


From: mwoehlke
Subject: Re: Coretutils tail command no longer correctly accepting +2 as a parameter
Date: Fri, 15 Sep 2006 09:48:43 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.0

Eric Blake wrote:
According to Bruce Baxter on 9/14/2006 10:42 PM:
The GNU coreutils version 5.97 (included with Fedora Core 5 in RPM
coreutils-5.97-1.2) returns an error, for example:

     tail: cannot open `+2' for reading: No such file or directory

This is not a bug in coreutils, but a consequence of your choice
(inherited from Fedora Core 5's choice) of POSIX compliance.  This is
becoming a FAQ; see my reply on this same subject from last week:
http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00035.html

Just for the record, I was hit with this too; when I built 5.97 across our supported platforms (about nine combinations of hardware and OS), a script using the old '-#'/'+#' syntax broke. I added '-n' to it, but that in turn caused it to break with several non-GNU versions of head/tail that don't recognize '-n'; IOW, it broke compatibility with non-GNU versions of these utilities.

I haven't re-tested with 6.x, but for now what I've been doing is sticking with '-n' and requiring this particular script to use GNU head/tail. After all, it's *SO* much easier to write "portable" scripts when all the platforms you run the script on have not only the same GNU toolchain, but the same *versions* of GNU tools :-).

--
Matthew
Download. Untar. Configure. Make. Install. Lather. Rinse. Repeat.





reply via email to

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