Created
April 12, 2019 00:07
-
-
Save razhangwei/79c90bc7d606d3a2c0c05bbfe1d00542 to your computer and use it in GitHub Desktop.
Search and remove ^M in all files in a directory #Unix
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
find . -type f | xargs -Ix sed -i.bak -r 's/\r//g' x | |
find . -type f -name '*.bak' | xargs -Ix rm x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment