This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Simplest way to translate file formats.
- To: John Wiersba <John dot Wiersba at medstat dot com>
- Subject: Re: Simplest way to translate file formats.
- From: Frank Cusack <fcusack at iconnet dot net>
- Date: Tue, 10 Nov 1998 17:18:44 -0500
- 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@mail.medstat.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.wiersba@medstat.com)
>
> -----Original Message-----
> From: Chris Searle [mailto:chris@searle1.demon.co.uk]
> Sent: Thursday, November 05, 1998 1:09 PM
> To: gnu-win32@cygnus.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@cygnus.com" with one line of text: "help".