Ravi Sir's Cards › AWS
grep exit codes in scripts?
This interview card answers: grep exit codes in scripts? 0 found, 1 not found, 2 error. Quiet check. Fixed text with brackets.
Read card text
What this card says
What it is
0 found, 1 not found, 2 error.
Why it matters
Quiet check.
grep -q ready status.txt && echo up
How / example
Fixed text with brackets.
grep -F "[ERROR]" log