Created
February 25, 2025 06:33
-
-
Save simryang/b717b45c05181581dbf6cfcbf1d5a412 to your computer and use it in GitHub Desktop.
find DOS line-ended files and convert them into UNIX line-ended
This file contains hidden or 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/env bash | |
if ! command -v fromdos > /dev/null 2>&1; then | |
sudo apt update && sudo apt install -y tofrodos | |
fi | |
grep --exclude-dir=".git" -URIl ^M . | xargs fromdos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
grep options help: