On 11/8/21 06:59, Christoph Anton Mitterer wrote:
the console output in the 0x02 case seems to imply that grep already considers it binary (and not text file). So I thought it would make sense to do the same if it encounters 0x00.
No, because grep is documented to treat 0x00 like newline in some cases, such as the case you described. It does not treat 0x02 like newline.