Tag
Shell
1 post tagged Shell.
Posts

09/27/2026
grep exit status: 0, 1 and 2 explained
grep exits 0 when it selected a line, 1 when it selected none, and 2 on an error. Here is what -q, -c, set -e and pipelines do to that.
Tag
1 post tagged Shell.

09/27/2026
grep exits 0 when it selected a line, 1 when it selected none, and 2 on an error. Here is what -q, -c, set -e and pipelines do to that.