I have found that many of my files have DOS line endings. In VI they look like this: \"^M\". I don\'t want to modify files that don\'t have these DOS line endings. How do
A modification to the Winning answer if you need to filter by file ending
grep -URl ^M . | grep .php | xargs dos2unix
I used dos2unix instead of fromdos but the effect should be the same.