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.
Note, if you don't use SVN like I did, it's a bit simpler:
ReplyDeletefind . -type f -exec grep -Ils $'\r$' {} \;
... and if you use git:
ReplyDeletefind . -type f -not -path './.git/*' -exec grep -Ils $'\r$' {} \;