strings: Default to -a

This commit is contained in:
sin 2015-02-17 13:39:17 +00:00
parent 9effb224c8
commit 8ce6d7091a
3 changed files with 10 additions and 2 deletions

2
README
View File

@ -67,7 +67,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
sort no -m, -o, -d, -f, -i sort no -m, -o, -d, -f, -i
=* split yes none =* split yes none
=* sponge non-posix none =* sponge non-posix none
strings no -a, -n, -t strings no -n, -t
=* sync non-posix none =* sync non-posix none
=* tail yes none =* tail yes none
=* tar non-posix none =* tar non-posix none

View File

@ -6,6 +6,7 @@
.Nd print the strings of printable characters in files .Nd print the strings of printable characters in files
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl a
.Op Ar file ... .Op Ar file ...
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm .Nm
@ -15,6 +16,11 @@ long. If no
are given, are given,
.Nm .Nm
reads from stdin. reads from stdin.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl a
Scan files in their entirety. This is the default.
.El
.Sh STANDARDS .Sh STANDARDS
.Nm .Nm
mirrors the semantics of Plan9 mirrors the semantics of Plan9

View File

@ -9,7 +9,7 @@ static void dostrings(FILE *fp, const char *fname);
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [file ...]\n", argv0); eprintf("usage: %s [-a] [file ...]\n", argv0);
} }
int int
@ -19,6 +19,8 @@ main(int argc, char *argv[])
int ret = 0; int ret = 0;
ARGBEGIN { ARGBEGIN {
case 'a':
break;
default: default:
usage(); usage();
} ARGEND; } ARGEND;