I am not sure if these ^@ appear only at the end of the line
In vi hex mode these appear as 0000.
I have tried s/\x0//g s/\x00//g s/\x{0000}//g s/\x0+$//g s/[^:print]//g;
and the result has been that it deletes everything in the line, expect the last one which leaves the text and the nulls in. I just want to remove them. Using Any ideas ?