[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] documentation bug in tail: no mention of -n +N syntax
From: |
Jim Meyering |
Subject: |
Re: [patch] documentation bug in tail: no mention of -n +N syntax |
Date: |
Wed, 27 Dec 2006 16:05:04 +0100 |
Evan Hunt <address@hidden> wrote:
>> > In trying to figure out how to fix my script, I checked "tail --help" and
>> > "man tail", and there was no mention of the fact that tail even *has* this
>> > ability anymore.
>>
>> It should be later on the help. Coreutils 6.7 "tail --help" says:
>>
>> -n, --lines=N output the last N lines, instead of the last 10
>> ...
>>
>> If the first character of N (the number of bytes or lines) is a `+',
>> print beginning with the Nth item from the start of each file, otherwise,
>> print the last N items in the file.
Thanks for the suggestion.
Here's what I've checked in, trying to keep a balance between saying
too much (which would duplicate the description near the end of --help)
and making things more accurate.
FYI, you can usually find the latest here:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=summary
diff --git a/ChangeLog b/ChangeLog
index 5120963..8644682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-27 Jim Meyering <address@hidden>
+
+ * src/tail.c (usage): Mention +N for --bytes and --lines.
+ Suggestion from Evan Hunt.
+
2006-12-26 Jim Meyering <address@hidden>
* configure.ac: Require autoconf-2.61 and automake-1.10.
diff --git a/src/tail.c b/src/tail.c
index d17f40a..2582b9d 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -231,7 +231,8 @@ Mandatory arguments to long options are mandatory for short
options too.\n\
inaccessible when tail starts or if it becomes\n\
inaccessible later; useful when following by
name,\n\
i.e., with --follow=name\n\
- -c, --bytes=N output the last N bytes\n\
+ -c, --bytes=N output the last N bytes; alternatively, use +N to\n\
+ output bytes starting with the Nth of each file\n\
"), stdout);
fputs (_("\
-f, --follow[={name|descriptor}]\n\
@@ -241,7 +242,8 @@ Mandatory arguments to long options are mandatory for short
options too.\n\
-F same as --follow=name --retry\n\
"), stdout);
printf (_("\
- -n, --lines=N output the last N lines, instead of the last %d\n\
+ -n, --lines=N output the last N lines, instead of the last %d;\n\
+ or use +N to output lines starting with the Nth\n\
--max-unchanged-stats=N\n\
with --follow=name, reopen a FILE which has not\n\
changed size after N (default %d) iterations\n\
--
1.4.4.3.g5485