Created
February 14, 2012 07:15
-
-
Save maletor/1824441 to your computer and use it in GitHub Desktop.
Trying to append md5 on files in a certain subdirectory.
This file contains 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
DIR="{$BASH_SOURCE[0]}../public/{assets,images}/**" | |
for F in $DIR/*.*; do | |
mv "$F" "${F}$(md5sum "$F" | cut -d' ' -f1).${F##*.}"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment