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