Created
December 1, 2015 18:23
-
-
Save takuma-saito/cda0fd9c9510c5bf00e3 to your computer and use it in GitHub Desktop.
ascii2decimal
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
#!/bin/zsh | |
echo -en "$1" | hexdump -v -e '/1 "%02x "' | tr ' ' '\n' | xargs -I{} zsh -lc 'printf "\\\0%03d\n" $(echo $[[#8] 16#{}] | cut -b3-)' | tr -d '\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment