grep: Fix exit status on use of -l
This commit is contained in:
committed by
Michael Forney
parent
5b92551057
commit
036449cdf1
2
grep.c
2
grep.c
@@ -135,6 +135,7 @@ grep(FILE *fp, const char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (match != vflag) {
|
if (match != vflag) {
|
||||||
|
result = Match;
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 'c':
|
case 'c':
|
||||||
c++;
|
c++;
|
||||||
@@ -152,7 +153,6 @@ grep(FILE *fp, const char *str)
|
|||||||
puts(buf);
|
puts(buf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result = Match;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mode == 'c')
|
if (mode == 'c')
|
||||||
|
Reference in New Issue
Block a user