Although cat is super common, it's less known that without a file provided, it reads from standard in. So it can be used as a kind of input reflector.
Used with od, which 'dumps files in octal and and other formats', we have ourselves a quick and dirty encoder!
Simply pipe cat into od.
cat | od -xEnter whatever character or string you want in some other form. cat reads until it encounters and end-of-file (EOF), so hit enter, and then send an EOF. You can do this with a newline ^d (CTRL+D).
Some useful od options are -x for hex and -b for octal.
No Comments Yet!