diff options
author | rsc <devnull@localhost> | 2007-05-03 22:26:51 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2007-05-03 22:26:51 +0000 |
commit | 29cfa3856775fb8ac5a0d0f3871852d83dfc4af6 (patch) | |
tree | 8ebab1f6472c7c925048761ca9dd8a2fc625e677 /src/cmd | |
parent | 3270dcf06cc423e21a4b4739dced131115716f2d (diff) | |
download | plan9port-29cfa3856775fb8ac5a0d0f3871852d83dfc4af6.tar.gz plan9port-29cfa3856775fb8ac5a0d0f3871852d83dfc4af6.tar.bz2 plan9port-29cfa3856775fb8ac5a0d0f3871852d83dfc4af6.zip |
add gnu grep -q flag (rob pike)
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/grep/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |