delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/18/10:17:27

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,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4D83695B.8080200@redhat.com>
Date: Fri, 18 Mar 2011 08:16:59 -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 "always" testmode
References: <loom DOT 20110318T083042-612 AT post DOT gmane DOT org>
In-Reply-To: <loom.20110318T083042-612@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

--------------enigE6CBCC30C171EF4BF316D82C
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 03/18/2011 01:43 AM, Ralf wrote:
> I'm using cygwin under windows to change text-files with windows line-end=
ings=20
> (CR and LF). I wrote a lot of shell-scripts which call each other. The=20
> filenames in those scripts are sometimes given als windows filenames (e.g=
.=20
> c:\temp\file.txt) sometimes relative (e.g. ../tmp/file.txt) sometimes as =
unix=20
> filenames (e.g. /c/temp/file.txt) and sometimes without any directory (e.=
g.=20
> file.txt)
>=20
> The current versions of cygwin now only use entries from fstab to determi=
ne=20
> the mode but this will break all my scripts because the same file will=20
> sometimes be treated as binary (filename c:\temp\file.txt) and sometimes =
as=20
> text (filename /c/temp/file.txt).
>=20
> So is there a way to say 'use always textmode' like it was possible in fo=
rmer=20
> releases?

Use cygpath to convert the filename to POSIX style, so that you never
open a DOS path.

--=20
Eric Blake   eblake AT redhat DOT com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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

iQEcBAEBCAAGBQJNg2lbAAoJEKeha0olJ0NqXe8IAJ1NWfEICfb4YMZWMPet4ryL
zmmH9c6FwY75FefO6BMeGXdlupmdJ9g/qiYLbwC2c5R7KhCAuaeSQUgH/bx3Hqxf
0Dvo3HorEqhDeLtCyxuzNdtp9YsH+twNsdWivqXTyRhXS1VIc24FLaB0sTHNIIoS
G0X2y4JeST+Dtu/p7UF4Raf1vyO1jQE+4vIcSPGSOETRtvDLZbKhJ8XdE8kNcjI3
R41bwjjDJ7sbxRre4iwUpzhd3VcaIk2vMduLigiBEPfktVYkjmucSAheVJ489SYn
47MOC0Bv7/OAzjlJ1/ohQ3jOEYsrxQ12w3zInb/jK46SfZFu89PPPtV0OcZbwFU=
=BO0W
-----END PGP SIGNATURE-----

--------------enigE6CBCC30C171EF4BF316D82C--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019