Last active
October 30, 2019 18:39
-
-
Save druid628/1345812 to your computer and use it in GitHub Desktop.
Perl 1-Liner to remove dos line endings from a file (all the while backing it up)
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
| #NOTE: ^M -- To get the ^M you must use <CTRL+V><CTRL+M> | |
| # | |
| # $ perl -p -i.bak -e "s/^M//g" <FILENAME> | |
| # | |
| #Creates a <FILENAME>.bak file and removes the DOS line ending (^M) | |
| perl -p -i.bak -e "s/^M//g" <FILENAME> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment