/texmex

Terminal program to convert text, decimal, hexadecimal or binary and vice-versa

Primary LanguageCGNU General Public License v3.0GPL-3.0

texmex is a terminal program that can convert text, decimal, hexadecimal or
binary and vice-versa.

To generate the program, type 'make' in a terminal within the source and
copy the resulting binary to wherever you see fit, ie: /usr/local/bin

  Examples:
  ./texmex --text2bin this
  01110100011010000110100101110011

  ./texmex --hex2text 74686973
  this
  
  cat texmex.c | ./texmex -x
  23696E636C756465203C737464696F2E683E0A23696E636C756465203C7374646C69622E68
  3E0A23696E636C756465203C756E697374642E683E0A23696E636C756465203C6572726E6F
  2E683E0A23696E636C756465203C737472696E672E683E0A23696E636C756465203C737973
  2F73656C6563742E683E0A23696E636C756465203C6D6174682[...]

texmex options:
	-h, --help               Show this help message
	-V, --version            Show the program version and exit
	-B, --bin2text           Convert long binary string to readable text
	-b, --text2bin           Convert readable text to binary string
	-F, --file2hex FILENAME  Convert file content to hexadecimal
	-f, --file2int FILENAME  Convert file content to integer
	-H, --hex2bin            Convert hexadecimal to binary string
	-I, --int2bin            Convert decimal to binary string
	-i, --hex2int            Convert hexadecimal to decimal
	-j, --int2hex            Convert decimal to hexadecimal
	-l, --text2line          Remove newlines from text
	-s, --signed             Return signed results with hex2int
	-t, --hex2text           Convert hexadecimal text to readable text
	-X, --text2hex_escape    Prepend each hex with "\x" for use with 'printf'
	-x, --text2hex           Convert readable text to hexadecimal