Last active
November 7, 2016 21:31
-
-
Save Tester2009/3b02ba9cbe43b6aa9979f26c8101782e to your computer and use it in GitHub Desktop.
Convert Text to Hexadecimal
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
# this code is written in terminal | |
# basically in .sh | |
# just chmod this file | |
# usage: | |
# chmod +x Text2hex.sh | |
# ./Text2hex.sh "this is my hexa" | |
# 74 68 69 73 20 69 73 20 6d 79 20 68 65 78 61 | |
# | |
# source: http://stackoverflow.com/questions/6791798/convert-string-to-hexadecimal-on-command-line | |
echo -n $1 | od -A n -t x1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment