Mike Frysinger wrote:
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
Is is too a GNU issue! It's not POSIX's fault that you're the only ones
that can follow their standards correctly! ;-)
And in case I failed to make it clear (which it seems I did; sorry), I'm
not complaining (or even asking for anything - nope, not even an
explanation); I'm just making an observation about this change, as I
said originally, "for the record".
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
Actually, I think I'd switched from sed to head/tail (because I have to
suspect head/tail are faster) when I started running into this. :-)
Anyway, no worries, I know how to come up with work-arounds; for now, as
I said, my solution is "use GNU head/tail" (it's an internal script, so
I can get away with that). I'm just taking notes out loud.
--
Matthew
Download. Untar. Configure. Make. Install. Lather. Rinse. Repeat.
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils