projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09acc06
)
Fixed -qv interaction (thanks to a report and patch from David Douthitt).
author
Matt Kraai
<kraai@debian.org>
Thu, 4 Jan 2001 15:11:52 +0000
(15:11 -0000)
committer
Matt Kraai
<kraai@debian.org>
Thu, 4 Jan 2001 15:11:52 +0000
(15:11 -0000)
findutils/grep.c
patch
|
blob
|
history
grep.c
patch
|
blob
|
history
diff --git
a/findutils/grep.c
b/findutils/grep.c
index 83336613e21b978d873451ebdca98219c0941701..69195bfdcaadf7d8910aac39cab75b2be2e74fe4 100644
(file)
--- a/
findutils/grep.c
+++ b/
findutils/grep.c
@@
-85,6
+85,11
@@
static void grep_file(FILE *file)
}
else if (ret == REG_NOMATCH && invert_search) {
+ if (be_quiet) {
+ regfree(®ex);
+ exit(0);
+ }
+
nmatches++;
print_matched_line(line, linenum);
}
diff --git
a/grep.c
b/grep.c
index 83336613e21b978d873451ebdca98219c0941701..69195bfdcaadf7d8910aac39cab75b2be2e74fe4 100644
(file)
--- a/
grep.c
+++ b/
grep.c
@@
-85,6
+85,11
@@
static void grep_file(FILE *file)
}
else if (ret == REG_NOMATCH && invert_search) {
+ if (be_quiet) {
+ regfree(®ex);
+ exit(0);
+ }
+
nmatches++;
print_matched_line(line, linenum);
}