Skip to content

Instantly share code, notes, and snippets.

@pnappa
Created March 15, 2020 07:41
Show Gist options
  • Save pnappa/de8dab1d0b2f4a951a23e1a508d0fe31 to your computer and use it in GitHub Desktop.
Save pnappa/de8dab1d0b2f4a951a23e1a508d0fe31 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu
hash1="$1"
for word in $(cat /usr/share/dict/words); do
if shasum -a 1 <(printf "%s\0%s" "$hash1" "$word") | grep '^00'; then
echo $word
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment