Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

March 20, 2012

Find files with Windows line endings

Just a quickie with some bash magic... I wanted to eliminate mixed and windows line endings from my source files, and after some research and development I got this command line:

find . -not -name *.svn-base -exec grep -Ils $'\r$' {} \;

You must love bash and all of these amazing you-can-do-anything commands. Just takes some time to learn them, and to be able to use them without heavy googling.