Re: [OT] FileMerge as a vacuum
Re: [OT] FileMerge as a vacuum
- Subject: Re: [OT] FileMerge as a vacuum
- From: Cameron Hayne <email@hidden>
- Date: Sun, 18 Feb 2007 18:27:01 -0500
On 18-Feb-07, at 4:52 PM, Greg Guerin wrote:
First, create a file named 'uncr' with these two lines in it:
#!/bin/sh
tr '\r' '\n' <"$1"
While the above works fine for translating files with traditional Mac
end-of-lines, it will fail in an unpleasant way if you happen to have
files with Windows-style end-of-lines.
Here is a one-line Perl script that will fix the ends-of-lines no
matter what type they are:
perl -p -e 's/\r\n?/\n/g'
You should be able to use this in place of the above 'tr' command in
your 'uncr' script.
--
Cameron Hayne
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden