Article View: comp.sys.mac
Article #33675some hints to deal with hexed binaries ...
From: Werner Uhrig
Date: Wed, 26 Oct 1988 19:18
Date: Wed, 26 Oct 1988 19:18
51 lines
2612 bytes
2612 bytes
hexed sources that arrive here in multi-part section get processed
with the following sed-script (should work on your Unix-box):
#
# usage: combhex <files>
#
# Note: file "combhex.rc" contains the following line (minus the "#")
# followed by a blank line:
#(This file must be converted with BinHex 4.0)
#
cat /usr/local/lib/combhex.rc $* |\
sed -n -e 1,2p -e '/ /d' -e '/ /d' -e '/^---$/d' -e '/./p' > $1.hqx
simple save all the parts into one file, or call combhex with the
list of file-names (in the correct order) of the parts, and combhex
will (most of the time) strip all the "noise" so that you can use
xbin next. (Often the first-part message contains some basic docs
which you should extract into a separate file as the information will
not be preserved in the following process).
an output file is created named <something>.hqx (let's say a.hqx)
this can be downloaded either with xmodem, kermit, macput -u, and
processed with BinHex or StuffIt on the Mar, or:
it gets processed on the Unix-box with xbin, which converts it into
3 forks familiar as the normal MAC-file-format.
these MAC-files can be downloaded with "macput" setting the Mac up
to expect MacXmodem format, or:
I combine the 3 forks with macbin into one file x.bin for downloading
with "xmodem -sb", making sure that the MAC is set up to expect
MacBinary format...
if the the file was stuffed or packed, I also have the utilities
unpit and unsit on the Unix-box to break out the individual
files (but I do that only when I like to store the files online,
but separately, which is rare)
Hope this helps, I'll try to make the other utilities
available in follow-up messages...
Cheers, ---Werner
--
--------------------> PREFERED-RETURN-ADDRESS-FOLLOWS <---------------------
(ARPA) werner@rascal.ics.utexas.edu (Internet: 128.83.144.1)
(INTERNET) werner%rascal.ics.utexas.edu@cs.utexas.edu
(UUCP) ..!utastro!werner or ..!uunet!rascal.ics.utexas.edu!werner
Technical Details
Message-ID:
<3302@utastro.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!rutgers!cs.utexas.edu!utastro!wernerReferences:
<335@banyan.UUCP> <wXNRqpy00XoB45YUot@andrew.cmu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!rutgers!cs.utexas.edu!utastro!werner From: werner@utastro.UUCP (Werner Uhrig) Newsgroups: comp.sys.mac Subject: some hints to deal with hexed binaries ... Summary: sed-script to combine multiple part hex-postings. works MOST of the time Keywords: combhex, xbin, macbin, macput, macget, kermit, macbinary, unsit, unpit Message-ID: <3302@utastro.UUCP> Date: 26 Oct 88 19:18:27 GMT References: <335@banyan.UUCP> <wXNRqpy00XoB45YUot@andrew.cmu.edu> Organization: U. Texas, Astronomy, Austin, TX Lines: 51