Tuesday, March 11, 2014

find files with windows style linefeed

find . -name "*.sh" -exec grep -l "\r\n" {} \;

to fix them:

find . -name "*.sh" -exec grep -l "\r\n" {} \; | xargs dos2unix

No comments: