perl -i.bak -pe 's/\012/\015\012/g' infile
Courtesy to "format_c" and others at perl-community.de
Update:
Come to think of it, the funny thing is, transferring the files in ASCII mode should actually have taken care of the newline translation: that's what I believed that mode was for. Maybe your ftp client or the host's ftp server have a bug there.
Cheers, Sören
In reply to Re: convert files unix2dos using perl script
by Happy-the-monk
in thread convert files unix2dos using perl script
by cc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |