Created
August 22, 2018 16:17
-
-
Save sgqy/a5c2be49bf12a18f4c1900fb90ab5a83 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
imgs=($(find . -type f)) | |
imgc=${#imgs[@]} | |
for (( i=0; i<${imgc}; i++ )); | |
do | |
img="${imgs[$i]}" | |
sum=($(md5sum ${img})) | |
ext=$(echo ${img} | sed 's/^.*\.//g') | |
mv "${img}" "${sum}.${ext}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment