summaryrefslogtreecommitdiff
path: root/src/tail.c
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2015-11-30 22:09:29 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2015-11-30 22:09:29 +0100
commitf7ab20cd606fe6f66028a382d1b5736c4fea9d15 (patch)
treec45cc27cd45f370e64051364308e2931ac528244 /src/tail.c
parent79c5b8f452ad01382c8e1d3e495a65428ae59b02 (diff)
downloadcoreutils-f7ab20cd606fe6f66028a382d1b5736c4fea9d15.tar.xz
doc: avoid confusing K argument in the man pages of head and tail
The character 'K' representing numeric user input can be confusing, especially in the context where it can be suffixed by the multipliers K, M, G, etc. Use NUM instead. * doc/coreutils.texi (head invocation): Replace @var{k} by @var{num}. Also change @var{count} in the paragraph about the obsolete option syntax. (tail invocation): Likewise. Furthermore, adjust the option order to alphabetical sorting. * src/head.c (usage): s/K/NUM/ in as placeholder in the -c and -n options. Furthermore, print the actual DEFAULT_NUMBER instead of the hard-coded 10. * src/tail.c (usage): s/K/NUM/ in as placeholder in the -c and -n options. Add "[+]" to clarify that NUM may optionally be preceded by this sign. Remove the redundant explanation of the optional '+' prefix for NUM, as that is now clear from the option description above. Suggested by Dan Jacobson in http://bugs.gnu.org/22042
Diffstat (limited to 'src/tail.c')
-rw-r--r--src/tail.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/tail.c b/src/tail.c
index 223c8f839..0a515791f 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -263,8 +263,8 @@ With more than one FILE, precede each with a header giving the file name.\n\
emit_mandatory_arg_note ();
fputs (_("\
- -c, --bytes=K output the last K bytes; or use -c +K to output\n\
- bytes starting with the Kth of each file\n\
+ -c, --bytes=[+]NUM output the last NUM bytes; or use -c +NUM to\n\
+ output starting with byte NUM of each file\n\
"), stdout);
fputs (_("\
-f, --follow[={name|descriptor}]\n\
@@ -273,8 +273,8 @@ With more than one FILE, precede each with a header giving the file name.\n\
-F same as --follow=name --retry\n\
"), stdout);
printf (_("\
- -n, --lines=K output the last K lines, instead of the last %d;\n\
- or use -n +K to output starting with the Kth\n\
+ -n, --lines=[+]NUM output the last NUM lines, instead of the last %d;\n\
+ or use -n +NUM to output starting with line NUM\n\
--max-unchanged-stats=N\n\
with --follow=name, reopen a FILE which has not\n\
changed size after N (default %d) iterations\n\
@@ -301,9 +301,7 @@ With more than one FILE, precede each with a header giving the file name.\n\
fputs (VERSION_OPTION_DESCRIPTION, stdout);
fputs (_("\
\n\
-If the first character of K (the number of bytes or lines) is a '+',\n\
-print beginning with the Kth item from the start of each file, otherwise,\n\
-print the last K items in the file. K may have a multiplier suffix:\n\
+NUM may have a multiplier suffix:\n\
b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\
\n\