Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: From: "Christopher Jones" To: cygwin Subject: RE: New sed in latest Date: Sun, 4 Jun 2000 17:06:42 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BFCE68.C70CB966" ------_=_NextPart_001_01BFCE68.C70CB966 Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Corinna Vinschen [mailto:corinna AT vinschen DOT de] > Sent: Saturday, June 03, 2000 4:47 AM > To: Bob McGowan > Cc: cygwin AT sourceware DOT cygnus DOT com > Subject: Re: New sed in latest > > > Bob McGowan wrote: > > But sed writes to standard output. So the correct answer > (I think) is > > that, to capture the "dos2unix" output, the script would need to be > > redirected to a file. If the file is in a binary mounted > environment, > > then it will be UNIX format, if it is text mounted it would > continue to > > be DOS format. > > > > Is this an accurate analysis? > > Indeed. To get rid of the \r you only have to start sed now, > doing nothing but writing it's input to a binary mounted > output file. > > Corinna This really seems broken if the way I mount something affects line endings such that I can't remove \r on a text mounted system with sed. I can't think of a place where I really want to use cygwin to do DOS things... but if I did wouldn't I have to handle \r\n on my own just as I would if I were to manipulate a dos partition from GNU/Linux? At least on UNIX how the file gets written doesn't change line endings on the way to disk. Yuck. Brian ------_=_NextPart_001_01BFCE68.C70CB966 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: New sed in latest

> -----Original Message-----
> From: Corinna Vinschen [mailto:corinna AT vinschen DOT de]
> Sent: Saturday, June 03, 2000 4:47 AM
> To: Bob McGowan
> Cc: cygwin AT sourceware DOT cygnus DOT com
> Subject: Re: New sed in latest
>
>
> Bob McGowan wrote:
> > But sed writes to standard output.  = So the correct answer
> (I think) is
> > that, to capture the "dos2unix" = output, the script would need to be
> > redirected to a file.  If the file is = in a binary mounted
> environment,
> > then it will be UNIX format, if it is text = mounted it would
> continue to
> > be DOS format.
> >
> > Is this an accurate analysis?
>
> Indeed. To get rid of the \r you only have to = start sed now,
> doing nothing but writing it's input to a = binary mounted
> output file.
>
> Corinna

This really seems broken if the way I mount something = affects line endings such that I can't remove \r on a text mounted = system with sed.  I can't think of a place where I really want to = use cygwin to do DOS things... but if I did wouldn't I have to handle = \r\n on my own just as I would if I were to manipulate a dos partition = from GNU/Linux?  At least on UNIX how the file gets written = doesn't change line endings on the way to disk.  Yuck.

Brian

------_=_NextPart_001_01BFCE68.C70CB966--