grep-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to suppress the exit status 1 when nothing matches?


From: Peng Yu
Subject: How to suppress the exit status 1 when nothing matches?
Date: Sat, 18 Sep 2021 12:32:31 -0500

Grep returns 1 when there is no match. How to suppress this exit
status, but still maintains the other exit status.

$ grep a < /dev/null
$ echo $?
1

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]