delorie.com/archives/browse.cgi | search |
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: | <4D8377D6.1000406@redhat.com> |
Date: | Fri, 18 Mar 2011 09:18:46 -0600 |
From: | Eric Blake <eblake AT redhat DOT com> |
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 |
References: | <loom DOT 20110318T083042-612 AT post DOT gmane DOT org> <4D83695B DOT 8080200 AT redhat DOT com> <loom DOT 20110318T153128-549 AT post DOT gmane DOT org> |
In-Reply-To: | <loom.20110318T153128-549@post.gmane.org> |
OpenPGP: | url=http://people.redhat.com/eblake/eblake.gpg |
X-IsSubscribed: | yes |
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 |
--------------enigBA2DB28053496260C4C77D7F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 > C:\sw\bin>sh twg.sh > ok POSIX path. >=20 > C:\sw\bin>sh ./twg.sh > ok POSIX path. >=20 > C:\sw\bin>sh .\twg.sh > .\twg.sh: line 2: syntax error near unexpected token `$'in\r'' > '\twg.sh: line 2: ` case "$funk" in DOS path - don't do that if you don't want surprises. And if you want bash to ignore \r, then reread the bash release announcements for several ideas for doing this (including 'set -o igncr' or setting the SHELLOPTS environment variable before bash is started). http://cygwin.com/ml/cygwin-announce/2011-02/msg00027.html >=20 > C:\sw\bin>sh c:\sw\bin\twg.sh > c:\sw\bin\twg.sh: line 2: syntax error near unexpected token `$'in\r'' > ':\sw\bin\twg.sh: line 2: ` case "$funk" in DOS path - don't do that if you don't want surprises. > In the past I didn't have to pay attention to line endings. All programs > (windows and cygwin) used CR LF. But now I have to look at each called pr= ogram > do find out wich line-endings are written. If you are writing files for cygwin, then it is much preferred that you omit CR, since cygwin emulates Linux which omits CR. But if you must interact with text mode files, then use a text mode mount or tell bash that you plan on working with text mode and that bash should ignore CR. > So is there a chance to get back the global setting of textmode, or is th= ere a > way to get textmode without changing all the scripts? /etc/fstab and set textmode mount points on the directories where you want it. But you _don't_ want it globally - for example it's great for data files elsewhere in windows, but a bad idea for cygwin's /bin. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigBA2DB28053496260C4C77D7F 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/ iQEcBAEBCAAGBQJNg3fWAAoJEKeha0olJ0NqggsIAIIwvZLuqXzNRc1sPnQSi1Mc eFbPSMhi/qa+LWv4EzRTwwiHQYH6vDPrceL6X/mwh9ssXYuUWtgVx3pdDzAeNIa1 tITlqxyzYV2OUdXWKV9SIX1anckef52xMIrbbbbb1JKttcDDaJmiXOenz3B6BBEf RPlsjdwh3TD6u+WvF6Wg+mFLLiZjCRO4ffHe5LJAthsoZwvJH7tVhEf4ydtvM7/J 0P3+6jGXQ0V3xyzLpy/9TdWJzWKWawzEbiYef4T632aibUqbwQ4Sf+olSm6hOILk F06tS6t+DyB7xsoMnUtUufHvFpsYNdetIRNx9feODYS/54ElBFwIJSrzo9NNRqY= =+vIK -----END PGP SIGNATURE----- --------------enigBA2DB28053496260C4C77D7F--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |