Last active
May 25, 2021 20:35
-
-
Save levigroker/193ba909e2354de870513eec46c08222 to your computer and use it in GitHub Desktop.
A BBEdit Text Filter script to take textual input and produce hedidecimal array values of the same.
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/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 | |
# [email protected] | |
# 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