diff options
-rwxr-xr-x | bsgrep | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -22,7 +22,7 @@ $SIG{__WARN__} = sub { # from the 'while(<>)' or File::Find. if($m !~ /^$self:/) { $m = "$self: $m"; - $ret = 2 unless $opt{s}; + $ret = 2 unless $opt{q}; } print STDERR $m unless $opt{s}; @@ -315,22 +315,29 @@ select lines that match all of the patterns; the default is to select lines that match any of the patterns. This option doesn't exist in B<grep>. +=item -q + +Quiet: don't write to standard output. Exit status will be zero if +a match was found, even if there were errors. This doesn't prevent +warnings/errors being printed to standard error; use B<-s> to silence +those. Same as B<grep>. + =item -r Recursively read all files under each directory, following symlinks only if they're on the command line. If no files or directories are given, reads the current directory. Same as B<grep>. -=item -v - -Print only lines that do I<not> match (same as B<grep>). - =item -s Silence warnings (same as B<grep>). This includes error messages about unreadable files as well as warnings about the input (see B<DIAGNOSTICS>, below). +=item -v + +Print only lines that do I<not> match (same as B<grep>). + =back =head1 EXAMPLE @@ -409,7 +416,7 @@ to be Unicode, it will be assumed ISO-8859-1, and converted to Unicode. =head1 EXIT STATUS 0 if there were any matches, 1 if there were none, or 2 if there -were errors (e.g. nonexistent file). However, with B<-s>, the exit +were errors (e.g. nonexistent file). However, with B<-q>, the exit status will be 0 or 1 even if there were errors. This is the same as B<grep>'s exit status. |