Message-ID: <6700@brl-tgr.ARPA>
Date: Thu, 20-Dec-84 16:33:15 EST
Article-I.D.: brl-tgr.6700
Posted: Thu Dec 20 16:33:15 1984
Date-Received: Sun, 23-Dec-84 01:06:32 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 15
You may be interested to know that the following UNIX shell will convert
any file into hex format.
od -bh $1 | awk '/^.0/{print substr($1,2,2) substr($2,2,2) substr($3,2,2) substr($4,2,2) substr($5,2,2) substr($6,2,2) substr($7,2,2) substr($8,2,2)}' | dd conv=ucase
Use 'CHMOD u+x conv' to make the shell (which I named conv) executable.
The shell is invoked as follows:
conv file.con (The result will be sent to the terminal)
conv file.con >file.hex (the reult will be sent to the file called file.hex)
Doug