This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: File format - UNIX/DOS while installing cygwin ?


Hello Ramneek,

Saturday, September 11, 2004, 12:52:53 AM, you wrote:

RS> While installing cygwin, it asks in the wizard whether file format is
RS> unix or dos. What is this for ?

From the rest of your post, looks like you already suspect the answer.
Unix ends each text line with just a "new line" code. Dos/Windows ends
each text line with a "carriage return" and then a "new line" code.

RS> I mainly am going to use cygwin for PERL. Now, all my files are
RS> created in unix and I just ftp them over onto the windows machine.
RS> Since matching is used in perl script, I am wondering if some of the
RS> input text files will end up with some extra characters At the end of
RS> each line which can throw the perl matching off ?

How do you FTP them from the Unix system to the Windows machine? What are
their file names?

If you use FTP from within Cygwin, they stay in Unix format.

If you use FTP from within Windows, and if the file names are considered
"text" files, then that FTP program probably does an "ascii" transfer,
adding the carriage return to each line.

RS> For example if my expected output that I am storing in a file is the
RS> following string:
RS> Output Found Correctly
RS> Then if I ftp such a file  over from unix and expect it to work on
RS> windows which File format  should I be selecting ? (I am using word
RS> boundary around the expected output).

If the original file is on Unix, and everything (including the FTP) is
under Cygwin, use the Unix format.

Bob Menschel




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]