Created
September 8, 2019 10:20
-
-
Save 00-matt/cb0f12a8c11836693070585e3f802549 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
# IN: deadbeef | |
# OUT: \xde\xad\xbe\xef | |
hexify() { | |
echo "$1" | fold -w 2 | sed -e 's/^/\\x/' | paste -s -d '' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment