Looks like someone already necro'd this thread so I won't have to.

I stumbled across this thread while looking for something faster than pywallet to convert hexkeys to WIF privkeys and addresses...
haven't quite gotten it running yet as it appears to depend on vim, which I don't usually have installed (vim provides xxd) just got it running after installing vim. It might be worth noting in the OP that it needs vim (and openssl, but I already had that) to run.
Why would this depend on vim? I don't see vim called anywhere in the script.
xxd is part of the Vim package. To avoid this dependency you can use perl as mentioned earlier in this thread.
To spare you the hassle of looking for it:
checksum() {
perl -we "print pack 'H*', '$1'" |
openssl dgst -sha256 -binary |
openssl dgst -sha256 -binary |
perl -we "print unpack 'H8', join '', <>"
}