Last active
August 29, 2015 13:55
-
-
Save sankars/8688483 to your computer and use it in GitHub Desktop.
Rename all files having its name or its contents matching the regex in a directory.
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
| for i in *; do new_name=$(echo $i | sed -e 's/1012/1015/g'); sed -i 's/1012/1015/g' $i ; mv $i $new_name; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment