From 29cfa3856775fb8ac5a0d0f3871852d83dfc4af6 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 3 May 2007 22:26:51 +0000 Subject: add gnu grep -q flag (rob pike) --- src/cmd/grep/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/cmd') diff --git a/src/cmd/grep/main.c b/src/cmd/grep/main.c index f5ab7ff4..3a21a3a6 100644 --- a/src/cmd/grep/main.c +++ b/src/cmd/grep/main.c @@ -1,7 +1,7 @@ #define EXTERN #include "grep.h" -char *validflags = "bchiLlnsv"; +char *validflags = "bchiLlnsqv"; void usage(void) { @@ -21,6 +21,10 @@ main(int argc, char *argv[]) flags[ARGC()]++; break; + case 'q': /* gnu grep -q means plan 9 grep -s */ + flags['s']++; + break; + case 'E': /* ignore, turns gnu grep into egrep */ break; -- cgit v1.2.3