1828390 Members
3506 Online
109977 Solutions
New Discussion

viewing ascii

 
Jeff Hagstrom
Regular Advisor

viewing ascii

What can I use to view a text file on the unix box that shows the hexidecimal and ascii codes?
or is there something that i can use in windows that would show it
4 REPLIES 4
Court Campbell
Honored Contributor

Re: viewing ascii

try emacs. I believe it has a hex mode. I hae not used it personally but have seen it used.

http://hpux.cs.utah.edu/hppd/hpux/Editors/emacs-21.4/

"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
OldSchool
Honored Contributor

Re: viewing ascii

or

"xd -vc "

hex dump, -v = all lines, -c = show printable characters

man xd for more
A. Clay Stephenson
Acclaimed Contributor

Re: viewing ascii

The standard commands xd and od will do this for you. Man xd and od for details. A very nice utility is hexedit.

http://hpux.its.tudelft.nl/hppd/hpux/Development/Tools/hexedit-1.2.10/
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: viewing ascii

Hi Jeff:

In addition to the fact that you can select the type of output shown by 'xd' (or 'od') [i.e. a character, octal, hexadecimal, etc.] you might find the manpages for 'ascii(5)' a useful companion reference. For that matter, see '/usr/share/lib/pub/ascii'.

In reality, 'xd' and 'od' are the same binary. They are a nice example of Unix's use of hard links. By naming the links differently, the default output can be automatically selected to be either octal ('od') or hexadecimal ('xd').

See the manpages for 'xd' (or 'od' --- it's the same) for output options.

Regards!

...JRF...