Mail Archives: cygwin/2000/06/04/17:21:47
------_=_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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2651.65">
<TITLE>RE: New sed in latest</TITLE>
</HEAD>
<BODY>
<BR>
<BR>
<P><FONT SIZE=3D2>> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> From: Corinna Vinschen [<A =
HREF=3D"mailto:corinna AT vinschen DOT de">mailto:corinna AT vinschen DOT de</A>]</FON=
T>
<BR><FONT SIZE=3D2>> Sent: Saturday, June 03, 2000 4:47 AM</FONT>
<BR><FONT SIZE=3D2>> To: Bob McGowan</FONT>
<BR><FONT SIZE=3D2>> Cc: cygwin AT sourceware DOT cygnus DOT com</FONT>
<BR><FONT SIZE=3D2>> Subject: Re: New sed in latest</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Bob McGowan wrote:</FONT>
<BR><FONT SIZE=3D2>> > But sed writes to standard output. =
So the correct answer </FONT>
<BR><FONT SIZE=3D2>> (I think) is</FONT>
<BR><FONT SIZE=3D2>> > that, to capture the "dos2unix" =
output, the script would need to be</FONT>
<BR><FONT SIZE=3D2>> > redirected to a file. If the file is =
in a binary mounted </FONT>
<BR><FONT SIZE=3D2>> environment,</FONT>
<BR><FONT SIZE=3D2>> > then it will be UNIX format, if it is text =
mounted it would </FONT>
<BR><FONT SIZE=3D2>> continue to</FONT>
<BR><FONT SIZE=3D2>> > be DOS format.</FONT>
<BR><FONT SIZE=3D2>> > </FONT>
<BR><FONT SIZE=3D2>> > Is this an accurate analysis?</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Indeed. To get rid of the \r you only have to =
start sed now,</FONT>
<BR><FONT SIZE=3D2>> doing nothing but writing it's input to a =
binary mounted</FONT>
<BR><FONT SIZE=3D2>> output file.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Corinna</FONT>
</P>
<P><FONT SIZE=3D2>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.</FONT></P>
<P><FONT SIZE=3D2>Brian</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01BFCE68.C70CB966--
- Raw text -