delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/11/13:53:20.1

From: fcusack AT iconnet DOT net (Frank Cusack)
Subject: Re: Simplest way to translate file formats.
11 Nov 1998 13:53:20 -0800 :
Message-ID: <199811102218.RAA19491.cygnus.gnu-win32@ratbert.iconnet.net>
References: <03F4742D8225D21191EF00805FE62B9993C69E AT mail DOT medstat DOT com>
To: John Wiersba <John DOT Wiersba AT medstat DOT com>
Cc: "'Chris Searle'" <chris AT searle1 DOT demon DOT co DOT uk>, gnu-win32 AT cygnus DOT com

Actually, \n in perl translates to the "end of line" character in
whatever platform you are on. For translations like this, you
should instead use \015 and \012 .

~frank

In message <03F4742D8225D21191EF00805FE62B9993C69E AT mail DOT medstat DOT com>, 
John Wiersba writes:
> If you have perl, you could try this script, which is what I use:
> 
> #!/bin/bash
> perl -pe 's/\r?(\n?)\x1a?$/\1/' "$@"
> 
> This is meant to replace any combination of the characters CR LF ^Z (in
> that order) at the end of a line with a LF (newline).
> 
> John Wiersba (john DOT wiersba AT medstat DOT com)
> 
> -----Original Message-----
> From: Chris Searle [mailto:chris AT searle1 DOT demon DOT co DOT uk]
> Sent: Thursday, November 05, 1998 1:09 PM
> To: gnu-win32 AT cygnus DOT com
> Subject: Simplest way to translate file formats.
> 
> 
> I've brought down a couple of tarballs for various ported apps for
> cygwin, and some have LF line terminated files, some have CR LF files.
> Now, all my mounts are binary, and configure barfs on CR LF.
> 

[...]

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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