Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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#n...

Interesting that they would optimize for this use case.



Especially 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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: