Last active
March 29, 2018 10:32
-
-
Save sparkida/7773170 to your computer and use it in GitHub Desktop.
First, find all files in current directory with the extension ".php" and remove all "^M" ^M = Ctrl+V + Ctrl+M (don't just type the caret "^" symbol and M...they are not the same :/ )
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/bash | |
#Find and replace all files with ^M (dos format) to Unix format. | |
find $(pwd) -type f -name "*.php" | while read file; do sed -e 's/^M//g' -i "$file"; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment