unix2dos command failed because of ^@ symbol present in the file

121 Views Asked by At

I'm facing below issue when performing unix2dos conversion

unix2dos: Binary symbol found at line 166
unix2dos: Skipping binary file Sample.txt

I can find ^@ characters in the file.

I can do -f which is force conversion of binary files

Any idea apart from this?

I am able to replace the characters using vi, but not with the script. Need to handle in the script, please let me know.

1

There are 1 best solutions below

0
Dave On

A ^@ is a null character. I assume your working on a Unix/Linux platform. Perhaps this answer may help identifying-and-removing-null-characters-in-unix

More information about the null character can be found at Wikie entry on null character