summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-06-05 12:24:49 +0200
committerJim Meyering <meyering@redhat.com>2012-06-05 19:55:26 +0200
commit295ee521bc1a4f473ee8b7b5a4be32c5b5c7386f (patch)
treeb118600100717eb2b4d653d02f397acf96bc7971 /NEWS
parent5fdd5c6310098c5ce3cbc608450d5c4104f18c2f (diff)
downloadcoreutils-295ee521bc1a4f473ee8b7b5a4be32c5b5c7386f.tar.xz
head: with --lines=-N (-n-N) reset file pointer on seekable input
* src/head.c (elide_tail_lines_seekable): Reset file pointer after printing up to an end-relative line-counted offset. Anoop Sharma reported the problem and suggested the fix. * tests/misc/head-pos: Add coverage via a very similar, existing test. Also add coverage for a previously untested block of code. * tests/misc/head-elide-tail ($READ_BUFSIZE): Update to 8192, to match the value of BUFSIZ I see today on Fedora 17/x86_64 (unrelated to this fix). * NEWS (Bug fixes): Mention it. Improved-by: Pádraig Brady
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS7
1 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 7c7c2c30e..c0e5fdbbb 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,13 @@ GNU coreutils NEWS -*- outline -*-
processes will not intersperse their output.
[the bug dates back to the initial implementation]
+ head --lines=-N (-n-N) now resets the read pointer of a seekable input file.
+ This means that "head -n-3" no longer consumes all of its input, and lines
+ not output by head may be processed by other programs. For example, this
+ command now prints the final line, 2, while before it would print nothing:
+ seq 2 > k; (head -n-1 > /dev/null; cat) < k
+ [This bug was present in "the beginning".]
+
ls --color would mis-color relative-named symlinks in /
[bug introduced in coreutils-8.17]