]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: od --strings: clarify operation
authorPádraig Brady <P@draigBrady.com>
Thu, 8 Jun 2023 09:58:10 +0000 (10:58 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 8 Jun 2023 10:06:20 +0000 (11:06 +0100)
* doc/coreutils.texi (od invocation): Remove mention of ASCII,
as all printable characters in unibyte locales are output.
* src/od.c (usage): Clarify that only NUL terminated strings
are displayed, and that it's printable chars, not only graphic chars
that are output. I.e., spaces are output also if part of the string.
Reported at https://bugs.ddebian.org/1037217

doc/coreutils.texi
src/od.c

index 6a693e283c38cd5f139230aeafe246780d341cd8..e9d7b8eb49a76c75a6a2443c100ff035b6b423a3 100644 (file)
@@ -2058,7 +2058,7 @@ Output at most @var{bytes} bytes of the input.  Prefixes and suffixes on
 @opindex --strings
 @cindex string constants, outputting
 Instead of the normal output, output only @dfn{string constants}: at
-least @var{bytes} consecutive ASCII graphic characters,
+least @var{bytes} consecutive printable characters,
 followed by a zero byte (ASCII NUL).
 Prefixes and suffixes on @var{bytes} are interpreted as for the
 @option{-j} option.
index 10a28e21fed9cbed030f2981bd1a1cd9a627c57a..f68407008e753235e5a20934482232fc1dd0a4aa 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -356,9 +356,8 @@ suffixes may be . for octal and b for multiply by 512.\n\
 "), stdout);
       fputs (_("\
   -N, --read-bytes=BYTES      limit dump to BYTES input bytes\n\
-  -S BYTES, --strings[=BYTES]  output strings of at least BYTES graphic chars;\
-\n\
-                                3 is implied when BYTES is not specified\n\
+  -S BYTES, --strings[=BYTES]  show only NUL terminated strings\n\
+                                of at least BYTES (3) printable characters\n\
   -t, --format=TYPE           select output format or formats\n\
   -v, --output-duplicates     do not use * to mark line suppression\n\
   -w[BYTES], --width[=BYTES]  output BYTES bytes per output line;\n\