delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/11/14:25:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 11 Sep 2004 11:24:33 -0700
From: Robert Menschel <Robert AT Menschel DOT net>
Message-ID: <47812857.20040911112433@Menschel.net>
To: "Ramneek Singh" <ramneek AT cisco DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: File format - UNIX/DOS while installing cygwin ?
In-Reply-To: <001201c497d4$584f7600$9c7ba8c0@amer.cisco.com>
References: <001201c497d4$584f7600$9c7ba8c0 AT amer DOT cisco DOT com>
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i8BIOukT029901

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019