Skip to content

Instantly share code, notes, and snippets.

@ehedaya
Created April 11, 2013 12:34
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 ehedaya/5363037 to your computer and use it in GitHub Desktop.
Save ehedaya/5363037 to your computer and use it in GitHub Desktop.
Prepend filenames with hash to randomize order
# change mask for different filetypes
for f in *.batch;
do
m=`shasum ${f} | awk '{print substr($1,0,6)}'`
echo "${f} -> ${m}_${f}"
mv $f ${m}_${f}
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment