]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
src/bin/grepc: Use the same exit status as grep(1)
authorAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 22:38:20 +0000 (23:38 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 22:38:22 +0000 (23:38 +0100)
This still needs more work, as we fail elsewhere with weird values.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/bin/grepc

index 102396273cef9632ea44c85b238633e8e4253ac1..2b9fd609a14a3dac246023bacaa5cf49e22cc13e 100755 (executable)
@@ -47,7 +47,7 @@ x=''
 grepc_err()
 {
        >&2 printf '%s\n' "$(basename "$0"): error: $*";
-       exit 1;
+       exit 2;
 }
 
 
@@ -134,7 +134,7 @@ while getopts "A:B:C:chilm:nrt:x:" opt; do
                esac;
                ;;
        \?)
-               exit 1;
+               exit 2;
                ;;
        esac;
 done;