* On Tuesday 2005-11-08 at 20:40:12 -0500, Charles Levert wrote:
However, encouraging
users to use the "test $? -gt 1" (or
"test $? -ge 2") logic might be a good
thing to do for portability in any case,
as this is all that POSIX mandates (for
grep, cmp, diff, and possibly others).
Should this be added to the docs?
option is used and a selected line is found.
+Note, however, that \s-1POSIX\s0 only mandates, for programs such as
+.BR grep ,
+.BR cmp ,
+and
+.BR diff ,
+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.
.SH BUGS