Subject: Option to make grep always exit with 0

From: Thomas Güttler Mailinglisten <[email-masked]>
Date: Tue, 24 Jun 2025 11:49:21 +0200

Hi,

after trying several tools like SaltStack and Ansible and several CI tools,
I came
to the conclusion that a Bash script is often the most convenient and
powerful solution.

To make Bash more robust, I use the "strict mode".

This works fine, except that very often I want to filter out some output,
and it
does not matter to me if there is a match or not.

Afaik there is no option to make `grep` always exit with a zero exit
status. No matter if a match was found or not. Errors like "file not found"
should still return a non-zero exit status.

Just out of curiosity, would you accept a patch to implement that?

Which command line argument could be used for that option?

Regard,
  Thomas Güttler