From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andre Oliveira da Costa" To: "Cygwin" Subject: Getting rid of the CR Date: Thu, 02 Dec 1999 12:23:00 -0000 Message-id: <002001bf3d02$d2fdf1b0$8400000a@costa.cadenet.com.br> X-SW-Source: 1999-12/msg00061.html 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andre Oliveira da Costa" To: "Cygwin" Subject: Getting rid of the CR Date: Fri, 31 Dec 1999 13:28:00 -0000 Message-ID: <002001bf3d02$d2fdf1b0$8400000a@costa.cadenet.com.br> X-SW-Source: 1999-12n/msg00061.html Message-ID: <19991231132800.AImwYHQb_ZXnnMoTFFtwMuJqbQv6_RTtiRC1NgpO60Q@z> 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