grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to grep/manual/html_node/Exit-Status.html,v


From: Jim Meyering
Subject: Changes to grep/manual/html_node/Exit-Status.html,v
Date: Sun, 23 Nov 2014 22:23:40 +0000

CVSROOT:        /webcvs/grep
Module name:    grep
Changes by:     Jim Meyering <meyering> 14/11/23 22:23:33

Index: html_node/Exit-Status.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/Exit-Status.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- html_node/Exit-Status.html  3 Jun 2014 14:47:03 -0000       1.19
+++ html_node/Exit-Status.html  23 Nov 2014 22:23:31 -0000      1.20
@@ -1,8 +1,8 @@
 <html lang="en">
 <head>
-<title>Exit Status - GNU Grep 2.20</title>
+<title>Exit Status - GNU Grep 2.21</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="description" content="GNU Grep 2.20">
+<meta name="description" content="GNU Grep 2.21">
 <meta name="generator" content="makeinfo 4.13">
 <link title="Top" rel="start" href="index.html#Top">
 <link rel="up" href="Invoking.html#Invoking" title="Invoking">
@@ -47,17 +47,13 @@
 
 <h3 class="section">2.3 Exit Status</h3>
 
-<p><a name="index-exit-status-171"></a><a name="index-return-status-172"></a>
-Normally, the exit status is 0 if selected lines are found and 1 otherwise. 
-But the exit status is 2 if an error occurred, unless the <samp><span 
class="option">-q</span></samp> or
-<samp><span class="option">--quiet</span></samp> or <samp><span 
class="option">--silent</span></samp> option is used and a selected line
-is found. 
-Note, however, that POSIX only mandates,
-for programs such as <samp><span class="command">grep</span></samp>, 
<samp><span class="command">cmp</span></samp>, and <samp><span 
class="command">diff</span></samp>,
-that the exit status in case of error be greater than 1;
-it is therefore advisable, for the sake of portability,
-to use logic that tests for this general condition
-instead of strict equality with 2.
+<p><a name="index-exit-status-176"></a><a name="index-return-status-177"></a>
+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
+<samp><span class="option">-q</span></samp> or <samp><span 
class="option">--quiet</span></samp> or <samp><span 
class="option">--silent</span></samp> option is used
+and a line is selected, the exit status is 0 even if an error
+occurred.  Other <samp><span class="command">grep</span></samp> 
implementations may exit with status
+greater than 2 on error.
 
    </body></html>
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]