This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Getting rid of the CR


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]