I have quite a large text file (around 20GB) that I use as a simple database, so each record is separated by a new line, and the breaking of this format will cause problems. This file also contains happens to contain some NUL characters, or at least that's what I suspect as
grep treats it as a binary file.
I've come across this question and answer, which states:
Some reading has indicated that grep looks for a null character in the first thousand or so bytes, then determines from that whether or not a file is 'binary'.
For this reason, I'm thinking of stripping these characters from the file with something like:
tr < file-with-nulls -d '\000' > file-without-nulls
But I want to be sure that doing so won't break the formatting of the file. Is this a possibility at all?