[Bf-committers] [11601] branches/soc-2007-mosani/source: Getting the render api branch to compile with Makefiles.

Hans Lambermont hans at lambermont.dyndns.org
Thu Aug 23 15:07:26 CEST 2007


Hans Lambermont wrote:

> Campbell Barton wrote:
> > This is a perl script that I use to convert all line endings in a dir
> > (not recursively)
> <snip>
> 
> this one is :
> 
> find . -name "*" -print -exec perl -p -i -e "s/\r\n/\n/" {} \;

better also add a "-type f" to it :

find . -type f -name "*" -print -exec perl -p -i -e "s/\r\n/\n/" {} \;

> and feel free to replace "*" with a different glob if needed.

ps. when you want to re-create the ^M, use this :

find . -type f -name "*" -print -exec perl -p -i -e "s/([^\r]*)\n/\1\r\n/" {} \;

-- Hans


More information about the Bf-committers mailing list