delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/02/12:12:11

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.3.1.2.20010202120624.025d9ed8@pop.ma.ultranet.com>
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Fri, 02 Feb 2001 12:07:10 -0500
To: bkeener AT thesoftwaresource DOT com, cygwin <cygwin AT sourceware DOT cygnus DOT com>
From: Larry Hall <cygwin AT cygwin DOT com>
Subject: Re: How do I remove CR/LF from text file
In-Reply-To: <VA.0000060c.009232ab@thesoftwaresource.com>
Mime-Version: 1.0

At 11:49 AM 2/2/2001, Brian Keener wrote:
>I was working on some code and output a text file which displays fine in 
>cygwin but I wanted to email the text to someone from within windows and 
>if I look at the text in wordpad it looks fine but if I look at it in 
>notepad then it is screwy and in either case if I try to cut and paste 
>into my email program then the text is still real screwy and I don't want 
>to have to edit it.  I assume this is a CR/LF issue - not a bug - I just 
>can't figure out how to change it.
>
>The text was originally created by sending to /tmp/foo which is on / 
>which is a binary mount and so I did a 
>
>cat /tmp/foo > /windows/temp/foo 
>
>in which case /windows is a text mount thinking this would fix it, but it 
>does not.  If I however go back and recreate the text file by outputting 
>it to /windows/temp/foo in the first place - then wordpad, notepad and my 
>email on like it, again I am assuming this is CR/LF related but that is 
>an assumption.
>
>Can someone provide me with a line that allows me to do a conversion 
>after the fact like this or is there such a beast - On some unixen we had 
>dos2unix and such.



How about piping it through tr, mapping \n to \r\n?



Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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