Skip to content

Instantly share code, notes, and snippets.

@AntoineTurmel
Created December 13, 2017 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntoineTurmel/51ebc5d176498a85882d8eb0ba1b80db to your computer and use it in GitHub Desktop.
Save AntoineTurmel/51ebc5d176498a85882d8eb0ba1b80db to your computer and use it in GitHub Desktop.
randomly rename 500px files with a proper file name
#!/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