diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-08-17 14:15:35 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-08-17 14:18:00 -0700 |
commit | 92526f7246464825c5547ceb08e01433e035c867 (patch) | |
tree | c0b229b67a5dce4ba8e46b74c0c015b5d7bd8b38 /doc | |
parent | bfcad04c5ef73c7d78eeff32127ee8e0462307db (diff) | |
download | grep-92526f7246464825c5547ceb08e01433e035c867.tar.gz |
grep: -L exits with status 0 if a file is selected
Problem reported by Anthony Sottile (Bug#28105).
* NEWS, doc/grep.texi (Exit Status), src/grep.c (usage): Document this.
* src/grep.c (grepdesc): Implement it.
* tests/skip-read: Test it.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/grep.texi | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/grep.texi b/doc/grep.texi index 24800c92..865acf12 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1067,6 +1067,9 @@ and only when @env{POSIXLY_CORRECT} is not set. Normally the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an error occurred. However, if the +@option{-L} or @option{--files-without-match} is used, the exit status +is 0 if a file is listed, 1 if no files were listed, and 2 if an error +occurred. Also, if the @option{-q} or @option{--quiet} or @option{--silent} option is used and a line is selected, the exit status is 0 even if an error occurred. Other @command{grep} implementations may exit with status |