From: John DOT Wiersba AT medstat DOT com (John Wiersba) Subject: RE: Simplest way to translate file formats. 10 Nov 1998 10:07:25 -0800 Message-ID: <03F4742D8225D21191EF00805FE62B9993C69E.cygnus.gnu-win32@mail.medstat.com> Mime-Version: 1.0 Content-Type: text/plain To: "'Chris Searle'" , gnu-win32 AT cygnus DOT com 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. I'm able to fix it by visiting each file in an editor that allows line endings to be specified and so save them in LF format after which it works a lot better. However, I've got one now with hundreds of files, that's going to take ages to solve - must be an easier way. My bash scripting is extremely poor, I wondered about using a sed script to replace all occurances, but a couple of questions: If I were to create a text != binary mount and work in that would this still be necessary. I do have a sneaking feeling I'm missing something, after all, these are from some of the more commonly visited port sites, and if everyone had to do this then they would most likely have been changed by now. If it affects things, I'm bringing them down as .tar.gz files and using the tar binary from the full distribution as tar -zxf tarball.tar.gz This shouldn't put the different line terminators in should it? Thanks all. -- Chris Searle - chris AT searle1 DOT demon DOT co DOT uk URL : http://www.searle1.demon.co.uk/ ICQ : 9437708 (see http://www.mirabilis.com) Page me : http://wwp.mirabilis.com/9437708 EmailExpress: 9437708 AT pager DOT mirabilis DOT com - 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". - 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".