How to setup cygwin to use "always" testmode

Eric Blake eblake@redhat.com
Fri Mar 18 14:17:00 GMT 2011


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

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

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20110318/fe77fdf8/attachment.sig>


More information about the Cygwin mailing list