Hi Eric, I removed everything and completely re-installed Cygwin with setup.exe using the UNIX binary option. I 'set -o igncr' in .bashrc. 'set | grep SHELLOPTS' show igncr is set. Yet the problems of bash scripts failing with '\r' errors and the resultant .CSV has a '^M' added to each line still appear. So it's going to take more than just installing using a binary setup and setting igncr in bash to resolve the problems.
I ran D2U on each bash script AND on the data files that it grep-ped within the scripts. Voila! Problem solved. Each script and data file came from a WinME system that had an aging version of cygwin (circa mid-2005). I wrote a script to run every file through d2u. Interestingly that script had to be 'd2u-ed' first. So I have a solution but I fail to see why the binary setup and igncr didn't work. I don't want to run every file I bring over through d2u as it's laborious. In a unrelated problem, the diff command doesn't seem to be in the installation. It was missing the last time I installed cygwin-1.5.24. SR > Date: Sat, 22 Sep 2007 06:28:38 -0600 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED]; cygwin@cygwin.com > Subject: Re: Cygwin setup on XP/Vista (UNIX/DOS compatibilty question) > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > http://cygwin.com/acronyms/#PPIOSPE -> redirecting to the list. > > According to Steve Richmond on 9/22/2007 12:31 AM: >>>>> 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'. >> In your case, I'd recommend using a binary mount, and bash's igncr option. >> Oh, and reread the announcements: >> http://cygwin.com/ml/cygwin-announce/2007-08/msg00014.html >> >>> After I reinstalled with the UNIX install option, I logged in and set igncr >>> and >>> verified with 'set | grep SHELLOPTS'. But grep adds an extra '^M' so >>> when I do 'paste -d, a.txt b.txt', paste gets confused. > > The setup.exe UNIX vs. DOS option only affects new installations. My > guess is that you have an existing text mount, which setup.exe won't > change; but to confirm that, you need to follow directions: > >> Problem reports: http://cygwin.com/problems.html > > and include the output of 'cygcheck -svr' as a text attachment. > >> >>> With the UNIX install option, I still can't run the bash scripts. It'll >>> fail with >>> those '\r' errors still. > > Again, bash only warns about \r errors on binary mounts if you have not > turned on the igncr option. Of course, the other alternative is to run > 'd2u' (or the new 'flip') on your scripts so that they no longer have \r. > > - -- > Don't work too hard, make some time for fun as well! > > Eric Blake [EMAIL PROTECTED] > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (Cygwin) > Comment: Public key at home.comcast.net/~ericblake/eblake.gpg > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFG9Qp284KuGfSFAYARAorTAJ9EtiET87eZ5k1brfTlKdCucP5lKACfbMJ2 > dGKBWkrkPsxOkrJD7WwdN1c= > =3Xjv > -----END PGP SIGNATURE----- _________________________________________________________________ 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/