| [reply] |
FTP has 2 modes: ascii and bin. The bin mode transfers the file exactly as it is, the ascii (text) mode makes end-of-line conversions between Unix and Dos. Having said that, if you transfered it in ascii mode and want to get it back to Unix format, you don't need to download it again, you can just use this command:
perl -pi.bak -e 's/\r//g' file
to convert it back to Unix format. Or your system may very well have a dos2unix utility doing just the same. On the AIX system where I do most of my work, dos2unix did not not exist, so that I created an alias for it using the Perl one-liner above. On most Linux systems, however, I would think that dos2unix should exist.
| [reply] [d/l] [select] |
Thank you so much!
That is very helpful!
Really appreciate your insight!
| [reply] |