I'm looking to write a pair of utilities that read in a newline separated list of integers on stdin and output their binary (4 byte) equivalent to stdout, and vice versa.
My first thought was a simple bash/linux command that would do this, but I was unable to find one. My second thought was to do this in C++, but I can't figure out how to change stdin or stdout to a binary stream.
Any thoughts on a good way to do this? I'm impartial to any particular programming language.