This file contains 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