Skip to content

Instantly share code, notes, and snippets.

@mcrmonkey
Last active September 4, 2016 00:45
Show Gist options
  • Save mcrmonkey/081bdc87280a58d6a6a5075e10c3bcfe to your computer and use it in GitHub Desktop.
Save mcrmonkey/081bdc87280a58d6a6a5075e10c3bcfe to your computer and use it in GitHub Desktop.
oneliner - Rename bunch of files for archiving
for I in *; do MD=$(sha512sum $I|awk -F\ '{print $1}'); EXT=$(echo $I|awk -F\. '{print $2}'); FIN="$MD.$EXT"; mv $I $FIN; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment