Re: breakpoints & line-endings
Re: breakpoints & line-endings
- Subject: Re: breakpoints & line-endings
- From: Peter N Lewis <email@hidden>
- Date: Fri, 24 Jun 2005 10:41:55 +0800
At 19:25 -0400 23/6/05, Tim Conkling wrote:
I imagine that there is a way to perform this procedure on all my
source files (recursively, searching in directories) with some
command-line magic. I'm not very proficient in this sort of thing --
can any CLI wizards out there tell me how to fix my files?
People still use tr/awk/sed?
perl -i.bak -p -e 's#(\015\012|\015|\012)#\012#g' *.c *.h
-i means inplace. -i.bak will make backup copies. change to just -i
to not save a backup (on your own head)
-p means read the input, process it, and print it automatically.
-e means the next thing is the script.
s search and replace
(\015\012|\015|\012) CRLF or CR or LF
with LF
globally
on a list of files.
Use at own risk of course.
Enjoy,
Peter.
--
<http://www.stairways.com/> <http://download.stairways.com/>
_______________________________________________
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