A BBEdit Text Filter script to take textual input and produce hedidecimal array values of the same.
#!/bin/bash | |
# | |
# ASCII to Hex | |
# https://gist.github.com/levigroker/193ba909e2354de870513eec46c08222 | |
# | |
# A BBEdit Text Filter script to take textual input and produce hedidecimal array values of the same. | |
# See http://bbeditextras.org/wiki/index.php?title=Text_Filters | |
# Levi Brown | |
# levigroker@gmail.com | |
# December 8, 2016 | |
## | |
IN=$(tee) | |
HEX=$(echo -n "$IN" | xxd -c 256 -i | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') | |
echo -n "${HEX}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment