Created
November 18, 2021 16:06
-
-
Save sachsgit/7819c2b5423d72c344f3deed955e6e45 to your computer and use it in GitHub Desktop.
UNIX `find` command to find all files to apply the `dos2unix` command on them
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
#!/bin/bash | |
find . -type f \ | |
\( -not -path "*/.git/*" \ | |
-and -not -path "*/target/*" \ | |
-and -not -path "*/.metadata/*" \ | |
-and -not -path "*/.sonar*/*" \) \ | |
-exec grep -Iq . {} \; \ | |
-exec grep -U $'\015' {} \; \ | |
-exec dos2unix {} \; \ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment