This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Getting rid of the CR
- To: "Cygwin" <cygwin at sourceware dot cygnus dot com>
- Subject: Getting rid of the CR
- From: "Andre Oliveira da Costa" <costa at cade dot com dot br>
- Date: Thu, 2 Dec 1999 18:21:32 -0200
Hi,
at the risk of asking something really stupid, I'll throw this one:
The scenario: all my include (.h) files were in DOS format (don't ask me
why... maybe because my first installation of B20.1 mounted / as textmode),
and this was confusing gcc's preprocessor. All my mounts are binary now. My
first approach to solve this was this small bash script:
#!/bin/sh
ex $1 << EOF
set ff=unix
wq
EOF
(the 'ex' program I'm using is a link to vim 5.5, which is able to convert
DOS-->UNIX by simply setting the appropriate file type)
The script runs without complaints, but doesn't work =T (i.e. the files
remain in DOS mode) The point is: if I do the same ex editing on the command
line:
ex some-file
set ff=unix
wq
it works -- the file is overwritten in UNIX format. Any hint why it doesn't
work on my here document?
BTW: After some useless fight, I modified the script to use 'tr', which gets
the job done as well, but forces me to use a temporary file...
TIA,
Andre
--
André Oliveira da Costa
(costa@cade.com.br)
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com