On Wed, May 21, 2003 at 11:50:27PM +0100, richard wrote:
Hello ALUG list,
Does anyone know to use the hexdump program?
I've been trying all night (and am at serious risk of fatal caffeine poisoning!)
All I want it to do is print every byte of a file in hex notation without any other rubbish (no indexes, no ASCII, no spaces, no line feeds, no nothing).
This *may* do something akin to what you're looking for:
perl -e 'while(read(STDIN,$i,1)){printf("%x",ord($i))}' < infile > outfile
I would check that the output is correct though.
It claims that you can pass it a format string in the same format as fprintf() so I tried this: $ hexdump -e "%x" {filename} >{outputfile}
but it just said that my format string was a "bad format {%x}".
Any help would be very much appreciated!
Richard.
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!