Thanks to: John Leadeham Harvey Wamboldt John D Groenveld Buddy Lumpkin Karl Vogel =============================================== emacs, vim. (If you just want to look at the file, use od.) John. =============================================== Beav - Binary Editor And Viewer (I haven't tried it on Solaris 8 but I expect it would work). EMACS hexl mode. Rgds, -H- =============================================== emacs? Not an editor, but very useful: od(1) John =============================================== Search for ghex in google. Good luck, --Buddy =============================================== Emacs has a mode to do it. If you're a VI person, the VIM editor (VI iMproved) has a nifty tool called xxd to make that easy. Example below. http://www.vim.org/ <Example> me% cat hello.c #include <stdio.h> #define MD_EXEC_BIN "/usr/ccs/bin" main () { printf ("hello, world\n"); printf ("bin directory is %s\n", MD_EXEC_BIN); exit (0); } me% cc -o hello hello.c me% ./hello hello, world bin directory is /usr/ccs/bin me% xxd hello > hello.hex me% cat hello.hex 0000000: 7f45 4c46 0102 0100 0000 0000 0000 0000 .ELF............ 0000010: 0002 0002 0000 0001 0001 09c8 0000 0034 ...............4 0000020: 0000 17bc 0000 0000 0034 0020 0005 0028 .........4. ...( 0000030: 001e 001c 0000 0006 0000 0034 0001 0034 ...........4...4 ... 0000be0: 9fc4 4000 0100 0000 81c7 e008 81e8 0000 ..@............. 0000bf0: 0000 0000 0000 0001 6d61 696e 0000 0000 ........main.... 0000c00: 6865 6c6c 6f2c 2077 6f72 6c64 0a00 0000 hello, world.... 0000c10: 6269 6e20 6469 7265 6374 6f72 7920 6973 bin directory is 0000c20: 2025 730a 0000 0000 0002 0c90 0000 0000 %s............. 0000c30: 0000 0000 0000 0000 0000 0000 0000 0000 ................ ... 0001c60: 0000 0000 0000 0001 0000 0000 ............ me% echo hello | xxd 0000000: 6865 6c6c 6f0a hello. me% echo bybye | xxd 0000000: 6279 6279 650a bybye. Edit hello.hex and replace the "6865 6c6c 6f" (hello) with "6279 6279 65". me% xxd -r hello.hex > hello2 me% chmod 755 hello2 me% ./hello2 bybye, world bin directory is /usr/ccs/bin Kevin Tsay SiteSmith, Inc. KTsay@sitesmith.com Tel : (408) 327-6984 Fax: (408) 588-1280 WWW.Sitesmith.comReceived on Tue Aug 21 16:49:01 2001
This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:25:02 EDT