SUSv3 -q compatibily exit status correction for grep again
This commit is contained in:
parent
c96b703ab0
commit
bf4497406f
@ -398,7 +398,9 @@ extern int grep_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(be_quiet)
|
if(be_quiet && matched)
|
||||||
return error_open_count ? 2 : 0;
|
return 0;
|
||||||
|
if(error_open_count)
|
||||||
|
return 2;
|
||||||
return !matched; /* invert return value 0 = success, 1 = failed */
|
return !matched; /* invert return value 0 = success, 1 = failed */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user