Whoah, even neater:
Thomas Ptacek | September 8th, 2005 | Filed Under: Uncategorized
If you’re on a Mac (and if you aren’t, what the hell is wrong with you?):
alias cbuf '(echo "u_char buf[] = {" && hexdump -ve \'/1 "0x%.2x,"\' !* && echo && echo "};" )' cbuf binary.dump | pbcopy <switch to Emacs> <paste>
pbcopy and pbpaste are two tools that have changed my life over the past few months. I have a sad, sad little life.


Roy
September 9th, 2005 1:49 am…and if you’re using KDE on Linux, you can use ‘dcop klipper klipper setClipboardContents’ to feed yer clipboard.
Great hexdump trick, thanks!
Leave a reply