Created
August 8, 2013 11:17
-
-
Save Ravendwyr/6183778 to your computer and use it in GitHub Desktop.
Convert all files in a directory from Window-style line endings to Unix-style.
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
#! /bin/sh | |
echo "Beginning conversion..." | |
for x do | |
echo "Converting $x..." | |
tr -d '\015' < "$x" > "$x.new" | |
mv "$x.new" "$x" | |
done | |
echo "Conversion complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment