What is the sed incantation to remove null bytes from a file? I'm trying:
s/\000//g
but that is stripping out strings of zeroes.
s/\x00//g
seems to have no effect. I'm trying to do this in a sed script, so I'm not sure the echo trick will work.
sed 's/\x0/\n/g'worked for me – doug65536 Feb 07 '14 at 07:33-iparameter to convert file in place. – zbyszek Apr 19 '16 at 19:20tr < file-with-nulls -d '\000' > file-without-nullsworks beautifully – Paul Carlton Nov 02 '17 at 18:17\xxxcan be used to produce a character whose hexidecimal value isxx. To produceNULL, use\x00. – Alexej Magura Jul 30 '18 at 21:22