Created
April 19, 2023 12:11
-
-
Save leandroh/50aecc993ee9ea5781cc92b964189b2e to your computer and use it in GitHub Desktop.
Convert Markdown files created in DOS/Windows (with \r\n) to Unix/Linux (only \n)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
for filename in ./*.md; do | |
tr -d '\015' < $filename > $filename.tmp | |
mv $filename.tmp $filename | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment