X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4D8386D8.8050105@redhat.com> Date: Fri, 18 Mar 2011 10:22:48 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: How to setup cygwin to use always textmode References: <4D83695B DOT 8080200 AT redhat DOT com> <4D8377D6 DOT 1000406 AT redhat DOT com> In-Reply-To: OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigF4374BB1CB910C5DC8030919" X-IsSubscribed: yes 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 --------------enigF4374BB1CB910C5DC8030919 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/18/2011 10:00 AM, ralf wrote: > Eric Blake redhat.com> writes: >> >> On 03/18/2011 09:11 AM, ralf wrote: >>> I can not understand why this feature has been dropped. >> >> What feature? Cygwin was designed with POSIX pathnames in mind. If DOS >> pathnames work, it is a fortunate side-effect, but not the primary >> design goal, and not subject to stay the same in future releases. The >> only way to guarantee sane behavior from cygwin is to always use POSIX >> pathnames. >> >=20 > During setup of cygwin you could choose between UNIX ending und DOS endin= g. Which was a bug in the GUI for offering it in the first place, because it basically set the text-mode mount flag on every single directory, including /bin, which is counterproductive. But you didn't need the setup.exe radio button to get the same effect, instead, just change your mounts manually (/etc/fstab) to set the text-mode mount flag on the subset of directories where it matters to you. > I choosed DOS (CR LF) endings and so I was able to mix cywin (my shell sc= ripts) > batch-files and windows executables and the naming of files didn't matter. > After updating to the current release most of my scripts failed!!! Windows > programs can't read the output of my scrips and my scripts can't read mos= t of > my text-files successfully. Then tell bash that you want it to ignore CR (set -o igncr, or set SHELLOPTS in the environment before invoking bash). > And how can I get bash to write always CR? Adding \r to each echo,cat,awk= ... ? > Only finding the places where this is necessary will take weeks. That's why we don't recommend text-mode mounts for cygwin-owned directories. dos2unix can also do some smart conversions (it has smarts to avoid corrupting binary files while still converting text files). --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigF4374BB1CB910C5DC8030919 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNg4bYAAoJEKeha0olJ0Nq5ggH/i7hj/123vNActS6oBcBz1cF BseS7MJiypiI+VTDfYnlHDs7czam27B1iv/5V0sMN38KvoMAt4528jl5WdBrIE1c re5kDH5B/EWfbAEx/RugDh7YqkzwsFdCIzMFNkPv6vLR1NzUrU5dMkAyZ5GEvZDe OXB/wvUeNARM3WDx6HKxJB1KF0Eg9oC+AGhen4ToBNu4oUdsynVRJ935I2chKhow 6COWe+0vvL4ZjrDXm+YM7FHf717/ckgfekr+JGqAlfDUzK8XPIbXvGACYEROSdS/ 3EHeJU2veyMqYiZDGHGWcj5oBdtmv1SjZVWc31Q2vfd4oL7E4lql81EsUnQNz18= =7oY4 -----END PGP SIGNATURE----- --------------enigF4374BB1CB910C5DC8030919--