Mail Archives: cygwin/1998/11/11/13:53:20.1
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 -