3 ms·
Unrelated note intrigued me, so I went looking in the source code; detection is here: https://git.savannah.gnu.org/cgit/grep.git/tree/src/grep.c#n2886 https://g
by watermelon0 3y ago
Unrelated note intrigued me, so I went looking in the source code; detection is here: https://git.savannah.gnu.org/cgit/grep.git/tree/src/grep.c#n2886 https://git.savannah.gnu.org/cgit/grep.git/tree/src/grep.c#n...
Interesting that they would optimize for this use case.
- remram 3y agoEspecially since grep -q exists. It would never come to my mind to direct grep's output to /dev/null, I wonder how this optimization came to be?