[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: |
Evan Hunt |
Subject: |
Re: [patch] documentation bug in tail: no mention of -n +N syntax |
Date: |
Sat, 16 Dec 2006 09:20:17 -0800 |
User-agent: |
Mutt/1.5.10i |
Oops, sorry, I just realized the patch I sent last night is less necessary
than I'd thought. The man page *does* include the text: "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". There was a
formatting glitch in my terminal program that obscured part of
the paragraph; mea culpa.
I still think the proposed change is worth making, though. In the table
listing the arguments, all it says is "output the last N lines"--a
statement that is not correct in all cases, but there's no indication
of this.
Here it is again, slightly improved.
Evan Hunt
==========================================
diff -u tail.c.00 tail.c
--- tail.c.00 2006-12-16 09:06:08.000000000 -0800
+++ tail.c 2006-12-16 09:11:55.000000000 -0800
@@ -231,7 +231,9 @@
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[bkm] if N is preceded by '-' or no sign, output the\n\
+ last N bytes; if it is preceded by a '+', output\n\
+ all bytes starting with the Nth.\n\
"), stdout);
fputs (_("\
-f, --follow[={name|descriptor}]\n\
@@ -241,7 +243,9 @@
-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[bkm] if N is preceded by a '-' or no sign, output the\n\
+ last N lines (default %d); if it is preceded by\n\
+ a '+', output all 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\