[Top][All Lists]
[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: |
Mike Frysinger |
Subject: |
Re: Coretutils tail command no longer correctly accepting +2 as a parameter |
Date: |
Fri, 15 Sep 2006 16:57:30 -0400 |
User-agent: |
KMail/1.9.4 |
On Friday 15 September 2006 10:48, mwoehlke wrote:
> 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.
wrong; this is not a GNU issue ... go complain to the POSIX people who write
the specs that coreutils [correctly] follows
did you read the link Eric posted ?
> 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 :-).
you might be able to get away with using sed in some places ...
`head -10` == `head -n 10` == `sed -n 1,+9p`
-mike
pgpALYezDm1ze.pgp
Description: PGP signature