|
Posted by UnRiel on July 3, 2008, 7:49 pm
Please log in for more thread options wrote:
> UnRiel wrote:
> > I have a nice PERL script I use to generate CISCO configurations, but
> > when I FTP the files to my Windows XP PC and try to read them in
> > Notepad, there is clearly no line wrap that Notepad understands. If I
> > otherwise read the file into WordPad first, save the file, then open
> > into Notepad, the formatting presents correctly.
>
> > I have generated the ASCII files using a simple 'print' command to a
> > file I generate using an 'open' command. I have tried both the newline
> > \n and the carriage return \r format characters.
>
> > Before I begin experiment with other characters, does anyone have a
> > solution for me gained from similar experience?
>
> Use ASCII mode rather than binary when using FTP to transfer text files
> from a Unix/Linux environment to a DOS/Windows environment. That way FTP
> transforms line-endings to the ones needed by the target platform.
>
> --
> RGB
Thanks to all. The ASCII mode FTP worked.
|