delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/02/13:04:48

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
Date: Fri, 02 Feb 2001 13:02:54 EST
X-Mailer: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va
Message-Id: <VA.00000610.00d4d876@thesoftwaresource.com>
To: cygwin <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: How do I remove CR/LF from text file
In-Reply-To: <4.3.1.2.20010202120624.025d9ed8@pop.ma.ultranet.com>
From: Brian Keener <bkeener AT thesoftwaresource DOT com>
Reply-To: bkeener AT thesoftwaresource DOT com

Larry Hall wrote:
> How about piping it through tr, mapping \n to \r\n?
>
I can't seem to get tr to exchange more than one character since I am 
only starting with one character.

 tr "[\n]" "[\n\r]" < /tmp/foo >/windows/temp/foo2     no apparent change

 tr "[\n]" "[\r]" < /tmp/foo >/windows/temp/foo2  No apparent change when 
looking in Notepad

 tr "[\n]" "[~]" < /tmp/foo >/windows/temp/foo2  all then newlines 
changed to ~

Got any idea what I am doing wrong - I don't see any other flags or 
switches that might make a difference.



--
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