Created
December 13, 2017 11:35
-
-
Save AntoineTurmel/51ebc5d176498a85882d8eb0ba1b80db to your computer and use it in GitHub Desktop.
randomly rename 500px files with a proper file name
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
#!/bin/bash | |
start=0 | |
for file in v2*; do | |
randomid=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1` | |
mv $file $randomid"-"$start.JPG | |
start=$((start + 1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment