Created
February 18, 2021 11:18
-
-
Save SuperSandro2000/e9947352a3b57967aab4bc4debe4ec7a 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 nix-shell | |
#!nix-shell -i bash -p ripgrep | |
#!/usr/bin/env bash | |
# vim: set filetype=bash: | |
set -eou pipefail | |
if [[ $# != 1 ]]; then | |
echo "Usage: $0 038342z429cavdp2q3mjczlprw83nca030mjlipjppr43bzg9db0" | |
exit 0 | |
fi | |
hash="$1" | |
for type in to-base16 to-base32 to-base64 to-sri; do | |
search+="-e \"$(nix "$type" --type sha256 "$hash")\" " | |
done | |
rg "$search" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment