On Sat, Dec 2, 2023, at 9:08 PM, Mike Frysinger wrote: > On 02 Dec 2023 15:53, Karl Berry wrote: >> Exit status yes, but at least historically, grep -q has been >> considered non-portable, in favor of grep ... >/dev/null. > > i get that `grep -q` is something historically we've avoided, but i > think it's one of those bad habits we should just get out of.
Hmm, `grep -q` *is* in POSIX, but I seem to recall tripping over a system that didn't have it (probably either a Solaris successor, or AIX) during the run-up to Autoconf 2.71. I'm cc:ing Paul Eggert for comment as I believe he's the person who most recently revised the grep section of https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Limitations-of-Usual-Tools.html . zw