X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: From: Steve Richmond To: Subject: Cygwin setup on XP/Vista (UNIX/DOS compatibilty question) Date: Fri, 21 Sep 2007 16:40:37 -0700 Content-Type: text/plain; charset="Windows-1252" MIME-Version: 1.0 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit 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/