Last active
September 29, 2018 22:27
-
-
Save nilium/145788068f89fad01194ca5bf164b912 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| args=() | |
| while [ $# -gt 0 ]; do | |
| case "$1" in | |
| --) shift; break;; | |
| -?*) :;; | |
| -) break;; | |
| *) break;; | |
| esac | |
| args=("${args[@]}" "$1") | |
| shift | |
| done | |
| for fp; do | |
| printf '%s %s\n' "$(shasum "${args[@]}" -- "$fp" | awk '{print $1}' | xxd -r -p | zbase32-encode)" "$fp" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment