Skip to content

Instantly share code, notes, and snippets.

@ehedaya
Created February 2, 2013 17:15
Show Gist options
  • Select an option

  • Save ehedaya/4698366 to your computer and use it in GitHub Desktop.

Select an option

Save ehedaya/4698366 to your computer and use it in GitHub Desktop.
Prepend files with short hash (to randomize alphabetization order)
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