Last active
August 29, 2015 14:02
-
-
Save verkholantsev/9c5ab2f21932fae8e633 to your computer and use it in GitHub Desktop.
Bulk rename
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
grep -r -l 'old' ./dir | xargs sed -i.bak "s/old/new/g" |
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
# Replace any `a-site-categorie` not followed by `s` | |
sed -i.orig '/a-site-categorie[^s]/s/a-site-categorie/a-site-category/' a-site-categories.bemhtml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment