New sed in latest

Christopher Jones cbjones@nortelnetworks.com
Sun Jun 4 14:21:00 GMT 2000


Title: RE: New sed in latest







> -----Original Message-----
> From: Corinna Vinschen [ mailto:corinna@vinschen.de ]
> Sent: Saturday, June 03, 2000 4:47 AM
> To: Bob McGowan
> Cc: cygwin@sourceware.cygnus.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






More information about the Cygwin mailing list