Before
$ vi -v file
This is a test^MRemove Control-M symbols from files on Mac
- Using
sedcommand
find . -type f -exec sed -i '' -e 's/\r//g' {} \;- Using
dos2unixcommand
brew install dos2unix
find . -type f -print0 | xargs -0 dos2unixAfter
$ vi -v file
This is a test