Solved unix file has ^@ character

June 5, 2012 at 14:37:26
Specs: VAX
I did a SFTP from vax machine, the file has ^@ characters that I need to get rid off.
Can you please help how I can conver it on Unix..

See More: unix file has ^@ character

Report •

June 5, 2012 at 15:44:49
✔ Best Answer
This works on Solaris 9. Let me know if you have any questions:


# cd <to your directory>

ls -1 *^@*| while read file
    mv "$file"  $(echo "$file"|sed 's/\^@//g')
# end script

EDIT: included ls -1 to make sure each filename appears only on one line.

Report •
Related Solutions

Ask Question