delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/04/17:21:47

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <C9A8E1D07093D111B76A0000F8C9918A038B0EC2@zrtpd003.us.nortel.com>
From: "Christopher Jones" <cbjones AT nortelnetworks DOT com>
To: cygwin <cygwin AT sourceware DOT cygnus DOT com>
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)

------_=_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>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt; 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>&gt; Sent: Saturday, June 03, 2000 4:47 AM</FONT>
<BR><FONT SIZE=3D2>&gt; To: Bob McGowan</FONT>
<BR><FONT SIZE=3D2>&gt; Cc: cygwin AT sourceware DOT cygnus DOT com</FONT>
<BR><FONT SIZE=3D2>&gt; Subject: Re: New sed in latest</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Bob McGowan wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; But sed writes to standard output.&nbsp; =
So the correct answer </FONT>
<BR><FONT SIZE=3D2>&gt; (I think) is</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; that, to capture the &quot;dos2unix&quot; =
output, the script would need to be</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; redirected to a file.&nbsp; If the file is =
in a binary mounted </FONT>
<BR><FONT SIZE=3D2>&gt; environment,</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; then it will be UNIX format, if it is text =
mounted it would </FONT>
<BR><FONT SIZE=3D2>&gt; continue to</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; be DOS format.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; Is this an accurate analysis?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Indeed. To get rid of the \r you only have to =
start sed now,</FONT>
<BR><FONT SIZE=3D2>&gt; doing nothing but writing it's input to a =
binary mounted</FONT>
<BR><FONT SIZE=3D2>&gt; output file.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; 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.&nbsp; 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?&nbsp; At least on UNIX how the file gets written =
doesn't change line endings on the way to disk.&nbsp; Yuck.</FONT></P>

<P><FONT SIZE=3D2>Brian</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01BFCE68.C70CB966--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019