[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #24934] confusing description of -c option
From: |
Jim Meyering |
Subject: |
Re: [bug #24934] confusing description of -c option |
Date: |
Wed, 26 Nov 2008 15:05:23 +0100 |
Pádraig Brady <address@hidden> wrote:
> <http://savannah.gnu.org/bugs/?24934>
Thanks. That looks fine. Please push it with a log like this:
doc: tail: fix description of --bytes=N (-c)
* doc/coreutils.texi (tail invocation): Use @var{n} consistently,
not a mix of that and @var{bytes}. Reported by anonymous
in <http://savannah.gnu.org/bugs/?24934>.
BTW, once you push that, I'll apply this:
>From 214bfaffbfc6164165fde633173a37aab3c9cffc Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 26 Nov 2008 15:02:58 +0100
Subject: [PATCH] doc: factor out list of suffix-to-number (e.g., KB->1000B)
mappings
* coreutils.texi (multiplierSuffixes, multiplierSuffixesNoBlocks):
New macros.
(od invocation, head invocation, tail invocation, split invocation):
(truncate invocation): Use them.
---
doc/coreutils.texi | 78 +++++++++++++++++++++++++++++----------------------
1 files changed, 44 insertions(+), 34 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index d949973..16acd7e 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -613,6 +613,44 @@ Common options
from the shell.
@end macro
+
address@hidden multiplierSuffixes{varName}
address@hidden
+Appending @samp{b} multiplies @var{\varName\} by 512,
address@hidden by 1000, @samp{K} by 1024,
address@hidden by 1000*1000, @samp{M} by 1024*1024,
address@hidden by 1000*1000*1000, @samp{G} by 1024*1024*1024,
+and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
address@hidden ignore
address@hidden is a number which may have one of the following
+multiplicative suffixes:
address@hidden
address@hidden => 512 ("blocks")
address@hidden => 1000 (KiloBytes)
address@hidden => 1024 (KibiBytes)
address@hidden => 1000*1000 (MegaBytes)
address@hidden => 1024*1024 (MebiBytes)
address@hidden => 1000*1000*1000 (GibiBytes)
address@hidden => 1024*1024*1024 (GigaBytes)
address@hidden example
+and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
address@hidden macro
+
address@hidden FIXME: same as above, but no ``blocks'' line.
address@hidden multiplierSuffixesNoBlocks{varName}
address@hidden is a number which may have one of the following
+multiplicative suffixes:
address@hidden
address@hidden => 1000 (KiloBytes)
address@hidden => 1024 (KibiBytes)
address@hidden => 1000*1000 (MegaBytes)
address@hidden => 1024*1024 (MebiBytes)
address@hidden => 1000*1000*1000 (GibiBytes)
address@hidden => 1024*1024*1024 (GigaBytes)
address@hidden example
+and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
address@hidden macro
+
@cindex common options
Certain options are available in all of these programs. Rather than
@@ -1780,11 +1818,8 @@ od invocation
Skip @var{bytes} input bytes before formatting and writing. If
@var{bytes} begins with @samp{0x} or @samp{0X}, it is interpreted in
hexadecimal; otherwise, if it begins with @samp{0}, in octal; otherwise,
-in decimal. Appending @samp{b} multiplies @var{bytes} by 512,
address@hidden by 1000, @samp{K} by 1024,
address@hidden by 1000*1000, @samp{M} by 1024*1024,
address@hidden by 1000*1000*1000, @samp{G} by 1024*1024*1024,
-and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
+in decimal.
address@hidden
@item -N @var{bytes}
@itemx address@hidden
@@ -2614,11 +2649,7 @@ head invocation
Print the first @var{n} bytes, instead of initial lines.
However, if @var{n} starts with a @samp{-},
print all but the last @var{n} bytes of each file.
-Appending @samp{b} multiplies @var{n} by 512,
address@hidden by 1000, @samp{K} by 1024,
address@hidden by 1000*1000, @samp{M} by 1024*1024,
address@hidden by 1000*1000*1000, @samp{G} by 1024*1024*1024,
-and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
address@hidden
@itemx -n @var{n}
@itemx address@hidden
@@ -2703,11 +2734,7 @@ tail invocation
Output the last @var{n} bytes, instead of final lines.
However, if @var{n} starts with a @samp{+}, start printing with the
@var{n}th byte from the start of each file, instead of from the end.
-Appending @samp{b} multiplies @var{n} by 512,
address@hidden by 1000, @samp{K} by 1024,
address@hidden by 1000*1000, @samp{M} by 1024*1024,
address@hidden by 1000*1000*1000, @samp{G} by 1024*1024*1024,
-and so on for @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
address@hidden
@item -f
@itemx address@hidden
@@ -2920,16 +2947,7 @@ split invocation
@opindex -b
@opindex --bytes
Put @var{size} bytes of @var{input} into each output file.
address@hidden is a number which may be followed by one of these
-multiplicative suffixes:
address@hidden
address@hidden => 512 ("blocks")
address@hidden => 1000 (KiloBytes)
address@hidden => 1024 (KibiBytes)
address@hidden => 1000*1000 (MegaBytes)
address@hidden => 1024*1024 (MebiBytes)
address@hidden example
-and so on for @samp{G}, @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
address@hidden
@item -C @var{size}
@itemx address@hidden
@@ -10412,15 +10430,7 @@ truncate invocation
@opindex -s
@opindex --size
Set the size of each @var{file} to this @var{size}.
address@hidden is a number which may be followed by one of these
-multiplicative suffixes:
address@hidden
address@hidden => 1000 (KiloBytes)
address@hidden => 1024 (KibiBytes)
address@hidden => 1000*1000 (MegaBytes)
address@hidden => 1024*1024 (MebiBytes)
address@hidden example
-and so on for @samp{G}, @samp{T}, @samp{P}, @samp{E}, @samp{Z}, and @samp{Y}.
address@hidden
@var{size} may also be prefixed by one of the following to adjust
the size of each @var{file} based on their current size:
--
1.6.0.4.1044.g77718