sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 8ce6d7091a38127e145f9e92d969e58c73c3dce0
parent 9effb224c89bf6009e463658576b10b4de33cd12
Author: sin <sin@2f30.org>
Date:   Tue Feb 17 13:39:17 +0000

strings: Default to -a

Diffstat:
README | 2+-
strings.1 | 6++++++
strings.c | 4+++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/README b/README @@ -67,7 +67,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support, sort no -m, -o, -d, -f, -i =* split yes none =* sponge non-posix none - strings no -a, -n, -t + strings no -n, -t =* sync non-posix none =* tail yes none =* tar non-posix none diff --git a/strings.1 b/strings.1 @@ -6,6 +6,7 @@ .Nd print the strings of printable characters in files .Sh SYNOPSIS .Nm +.Op Fl a .Op Ar file ... .Sh DESCRIPTION .Nm @@ -15,6 +16,11 @@ long. If no are given, .Nm reads from stdin. +.Sh OPTIONS +.Bl -tag -width Ds +.It Fl a +Scan files in their entirety. This is the default. +.El .Sh STANDARDS .Nm mirrors the semantics of Plan9 diff --git a/strings.c b/strings.c @@ -9,7 +9,7 @@ static void dostrings(FILE *fp, const char *fname); static void usage(void) { - eprintf("usage: %s [file ...]\n", argv0); + eprintf("usage: %s [-a] [file ...]\n", argv0); } int @@ -19,6 +19,8 @@ main(int argc, char *argv[]) int ret = 0; ARGBEGIN { + case 'a': + break; default: usage(); } ARGEND;