Created
June 6, 2017 17:01
-
-
Save frontrangerider2004/926977af9e60398d9e2888fbf0527ea6 to your computer and use it in GitHub Desktop.
Bash Onliners
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
# SED Search/Replace all files of type in a directory: | |
find ./ -type f -name "*.js" -print0 | xargs -0 sed -i .bak 's;<search-string>;<replace-string>' | |
# Find all files and exclude a pattern. The o option is essentially 'or' so this does exclude or print | |
find ./ -path "./my/path/to/ignore/" -prune -o -print |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment