Skip to content

Instantly share code, notes, and snippets.

@valgur
Created May 23, 2020 16:45
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 valgur/be533962476f0aac8a44e5ad40d66c6d to your computer and use it in GitHub Desktop.
Save valgur/be533962476f0aac8a44e5ad40d66c6d to your computer and use it in GitHub Desktop.
Add a checksum string to a state file name for Torch Hub
#!/bin/bash
mv "$1" "${1%.*}"-$(sha256sum "$1" | cut -c1-8).pt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment