Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Aug 1997 21:55:19 -0400
From:      Dave Chapeskie <dchapes@golden.net>
To:        "Pedro Giffuni S," <pgiffuni@fps.biblos.unal.edu.co>
Cc:        ports@FreeBSD.ORG
Subject:   Re: DOS to UNIX formater?
Message-ID:  <19970826215519.31896@golden.net>
In-Reply-To: <34039620.25E4@fps.biblos.unal.edu.co>; from Pedro Giffuni S, on Tue, Aug 26, 1997 at 07:51:12PM -0700
References:  <34039620.25E4@fps.biblos.unal.edu.co>

next in thread | previous in thread | raw e-mail | index | archive | help
> CR/LF format, is there any command to clean the file for UNIX (without
> mtools)?

perl -i.bak -pe 's/\r//g' filenames

You can specify as many filenames as you like.  The "-i.bak" causes
backups to be made to filename.bak, you can just use "-i" if no backups
are required.

I have the following in my .tcshrc file:
	alias kill_cr perl -i.bak -pe 's/\\r//g'

So I can just do:
	kill_cr filenames

-- 
Dave Chapeskie, DDM Consulting
E-Mail: dchapes@golden.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970826215519.31896>