Skip to content

Instantly share code, notes, and snippets.

@levigroker levigroker/ASCII to Hex
Last active Feb 8, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.