delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/21/19:41:10

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <BAY107-W10CF8DAFB3960A14C0012AC1BB0@phx.gbl>
From: Steve Richmond <srichman69 AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Cygwin setup on XP/Vista (UNIX/DOS compatibilty question)
Date: Fri, 21 Sep 2007 16:40:37 -0700
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l8LNepUm013570

I have a problem with running bash scripts and UNIX/Win compatibility.
I have 3 computers: a Windows ME PC (PC1), a Windows XP (PC2) and a
Windows Vista (PC3).

On PC1, I have an old version of Cygwin and bash (3.00.16.14 i686-pc-cygwin).
All my scripts have a .TXT suffix, so I can edit with Vim editor.  The scripts
generate .CSV (comma separated value) files, so I can examine and print with
Excel as well as edit with Vim.  I don't recall when I initially set it up
whether I set the Cygwin mode to be UNIX or DOS compatible for CR/LF.

On PC2 and PC3, I have an up-to-date version of Cygwin and bash
(3.2.5(7) i686-pc-cygwin).

However it behaves differently.  After I install it using UNIX, bash scripts
fail with '\r' errors, meaning it can't find the CR. So after I re-installed
to be DOS compatible for CR/LF, the bash scripts execute successfully, but
the resulting .CSV file has a '^M' added to each line.  Subsequent
manipulation with paste (as an example) fail because of the extra '^M'.

I read the FAQs about the different behavior with UNIX and DOS, but I must
have missed something because it should work one way or the other.

What do you I have to do with the setup to get the earlier behavior?



_________________________________________________________________
More photos; more messages; more whatever – Get MORE with Windows Live™ Hotmail®. NOW with 5GB storage.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907

--
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