[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

remove/replace non-ascii characters from file



I have a silly Window$ application that is supposed to export ascii data. In fact the file is 99% percent ascii (after dos2unix), but contains a line starting with "Comment: " that contains non-ascii garbage (represented as ^@^@^@^@^@^@ etc.)

I tried
$ grep -v Comment
but that just returns
Binary file darkaa2.dat matches

Is there a simple way to remove this line?
Before I start looking at sed or gawk, I would just like to know, if they would work with these silly 'binary files'.

NB: I can open the file with nano and manually delete the line, but it's not just one file to process.

Thanks,

Johannes



Reply to: