Skip to content

Commit 8fee99c

Browse files
committed
Update description of string's -n option.
PR 28632 * strings.c (usage): Update desciption of -n option. * doc/binutils.texi: Likewise.
1 parent c261149 commit 8fee99c

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

binutils/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2021-11-29 Nick Clifton <nickc@redhat.com>
2+
3+
PR 28632
4+
* strings.c (usage): Update desciption of -n option.
5+
* doc/binutils.texi: Likewise.
6+
17
2021-11-24 Nick Clifton <nickc@redhat.com>
28

39
PR 28564

binutils/doc/binutils.texi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3297,8 +3297,13 @@ Print a summary of the program usage on the standard output and exit.
32973297
@item -@var{min-len}
32983298
@itemx -n @var{min-len}
32993299
@itemx --bytes=@var{min-len}
3300-
Print sequences of characters that are at least @var{min-len} characters
3301-
long, instead of the default 4.
3300+
Print sequences of displayable characters that are at least
3301+
@var{min-len} characters long. If not specified a default minimum
3302+
length of 4 is used. The distinction between displayable and
3303+
non-displayable characters depends upon the setting of the
3304+
@option{-e} and @option{-U} options. Sequences are always terminated
3305+
at control characters such as new-line and carriage-return, but not
3306+
the tab character.
33023307

33033308
@item -o
33043309
Like @samp{-t o}. Some other versions of @command{strings} have @option{-o}

binutils/strings.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
--bytes=min-len
3333
-n min-len
3434
-min-len Print graphic char sequences, MIN-LEN or more bytes long,
35-
that are followed by a NUL or a newline. Default is 4.
35+
that are followed by a NUL or a non-displayable character.
36+
Default is 4.
3637
3738
--radix={o,x,d}
3839
-t {o,x,d} Print the offset within the file before each string,
@@ -1323,8 +1324,8 @@ usage (FILE *stream, int status)
13231324

13241325
fprintf (stream, _("\
13251326
-f --print-file-name Print the name of the file before each string\n\
1326-
-n --bytes=[number] Locate & print any NUL-terminated sequence of at\n\
1327-
-<number> least [number] characters (default 4).\n\
1327+
-n <number> Locate & print any sequence of at least <number>\n\
1328+
--bytes=<number> displayable characters. (The default is 4).\n\
13281329
-t --radix={o,d,x} Print the location of the string in base 8, 10 or 16\n\
13291330
-w --include-all-whitespace Include all whitespace as valid string characters\n\
13301331
-o An alias for --radix=o\n\

0 commit comments

Comments
 (0)