59 words
1 minute
Removing ^M Line Endings from Multiple Files
Files copied directly from Windows to Linux or macOS may show
^Mat the ends of lines ingit diff. Windows line endings use two characters,\r\n.
Install dos2unix
Ubuntu or Debian:
sudo apt-get install dos2unixCentOS:
sudo yum install dos2unixmacOS:
brew install dos2unixConvert one file
dos2unix filenameConvert multiple files
The original example finds Lua files and passes them to dos2unix:
find ./ -name *.lua | xargs dos2unix Removing ^M Line Endings from Multiple Files
https://blog.coding1024.com/en/posts/5dcaa2e/
Comments
Questions, ideas and experiences are welcome. Please be kind and avoid sharing private information.
Loading comments…