News for hackers. Stuff that matters.
Re:If you use GNU grep on text files, use the -a (--text) op... by iforgotpassword on Tuesday April 21, 2020 @04:22PM (#22938955)
Oh yes. I was bitten by that when I piped around some tool's output that eventually went through grep. The tool's output was actually text but for some reason there was a null byte at the end which nobody noticed before.

The fun part was that the way the data got chunked through the pipes was not deterministic, so sometimes you got the desired output from grep, but other times just "binary file matches", even when the raw output from the first tool was identical in both runs. That took quite some head scratching to figure out.

There are no comments on this comment yet.