From: Wouter (drempeltje@softhome.net)
Date: Sun Mar 16 2003 - 16:04:09 EST
Hi,
This is not realy a HPUX question but i try it anyway.
I have a nice unix-job, it must be very simple but i can't come till a
simple solution.
The problem is:
I want to convert a textfile to a normal file.
I have the following input in a textfile:
52 65 05 00 ab 20 31 30 30 30 00 6a 65 0a 00 9f
20 31 36 2c 36 38 3a a0 20 9d 20 88 20 31 30 30
30 30 00 8a 65 0f 00 54 31 24 ca e6 28 32 33 29
bd e6 28 31 30 29 bd e6 28 31 38 30 29 bd e6 28
30 29 00 aa 65 19 00 54 32 24 ca e6 28 32 33 29
bd e6 28 31 30 29 bd e6 28 31 32 30 29 bd e6 28
I want to convert this to a file with hexadecimal the same output as above,
so if i open the converted file in a hexeditor it has to look like the file
above.
I think this is maybe possible with the hexdump command.
Of course it is possible with a perl program.
I started with a program, it reads the textfile and strips out the
whitespace and CR/LF.
But if i create a file with open OUT,"test.hex" or die; and i print the
hex-characters to it, they are in ASCII again.
Does somebody can give me a hint or solution?
Regards,
Wouter van Til
-- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:27 EDT