Last active
January 17, 2017 11:51
-
-
Save sokil/615e902746d774501a116c348b783b7a to your computer and use it in GitHub Desktop.
rename or copy files from one dir to another
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
| find . -name "someFile.po" \ | |
| | grep someSourceDir \ | |
| | xargs -I{} sh -c 'old={}; new=$(echo $old | sed "s/someFile.po/someNewFile.po/g"); cp $old $new' |
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
| find . -name "someFile.po" \ | |
| | grep someSourceDir \ | |
| | xargs -I{} sh -c 'old={}; new=$(echo $old | sed "s/someSourceDir/targetDir/g"); mkdir -p $(dirname $new); cp -r $old $new' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment