Created
July 31, 2018 10:04
-
-
Save bmmalone/048881995bc76909bb53de9c4049ffe0 to your computer and use it in GitHub Desktop.
Convert carriage returns to line feeds
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 | |
tr '\r' '\n' < $1 > $1.tmp | |
mv $1.tmp $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Old mac text files used "carriage return" to indicate a new line. This small script (motivated by
dos2unix
) replaces those with line feeds.