1832513 Members
5062 Online
110043 Solutions
New Discussion

Viewing text in Hex

 
Karla Robinson
Occasional Contributor

Viewing text in Hex

Is there a way to view specific text contained in a file in Hex format?
7 REPLIES 7
Mel Burslan
Honored Contributor

Re: Viewing text in Hex

I am not sure if there is any equivalent available on the regular system distribution but from the "hpux public domain software porting archives" (mouthful isn't it?) you can get the hexedit package and use it. It can be found at :

http://hpux.cs.utah.edu/hppd/hpux/Development/Tools/hexedit-0.9.7/

both 10.20 and 11.00 compiled versions are available from this page.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Karla Robinson
Occasional Contributor

Re: Viewing text in Hex

Thanks! I'll give it a try.
Rodney Hills
Honored Contributor

Re: Viewing text in Hex

How about the "xd" command. It can't modify, but can view.

HTH

-- Rod Hills
There be dragons...
A. Clay Stephenson
Acclaimed Contributor

Re: Viewing text in Hex

You can simply do an od -tx myfile | pg although hexedit will be an easier to use interface once you get it installed.
If it ain't broke, I can fix that.
Francisco J. Soler
Honored Contributor

Re: Viewing text in Hex

Hi,

You can install gvim for HP-UX, see link below:
http://hpux.its.tudelft.nl/hppd/hpux/Editors/vim-6.1/

then, if you edit the text file with gvim editor you can switch between, hex view and normal text view with the command
:%!xxd and :%!xxd -r

Frank.
Linux?. Yes, of course.
Dave La Mar
Honored Contributor

Re: Viewing text in Hex

Karla -

Our shop uses a product called
Ultraedit. It is a very, very (+/- $30.00 USA) inexpensive text editor that allows viewing in hex. It also has the ability to open and save files via ftp.
For developers that abhor vi or are just inepdt, it provides a good alternatative ( I said good, not great, Forumers) to vi.

Best of luck.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Kyri Pilavakis
Frequent Advisor

Re: Viewing text in Hex

In very rear occassions that I need to use it....a file can be displayed in one or more formats by using the od (octal dump) command. If no file name is specified, the standard input is used:

od [ -oxc ] [filename]

--> -o will interpret words in octal; default option

--> -x Interpret words in hex

--> -c Interpret words in ASCII

e.g od -x infile
Bosses don't undestand..HP does