[comp.binaries.ibm.pc.d] Combine script for multiple-part uuencoded files from LISTSERV

w8sdz@WSMR-SIMTEL20.ARMY.MIL (Keith Petersen) (12/15/89)

Brian Vanlandingham <bvan@uncecs.edu> writes:
> Would it be possible for you to post something on how to concatenate
> multi part uuencoded binaries received from LISTSERV. The problem I'm
> having (an other people, judging from some of the posting on usenet)
> is that the much beloved 'combine' script we've been using to get
> binaries posted via newsgroups doesn't know how to deal with them
> because individual parts on the LISTSERV files lack a 'BEGIN' line.
> thanks.

The following Unix shell script "lcombine" is functionally the same as the
comp.binaries.ibm.pc "combine" script.  Use it to uudecode multiple-part
uuencoded files received from LISTSERV (or TRICKLE in Europe).

#! /bin/sh
cat $* | sed '/--- End /,/--- Part/d' | uudecode

Save that as an executable shell script called "lcombine".  Assuming
you have saved the multiple-part uuencoded files in a logical manner,
such as:

     simibm.uue1, simibm.uue2, simibm.uue3

invoke the script like this:

lcombine simibm.uue*

It will combine all the pieces together, skipping everything between
the dashed lines with "End" and "Part", and feed the result to uudecode.

Keith
--
Keith Petersen
Maintainer of SIMTEL20's CP/M, MSDOS, & MISC archives [IP address 26.2.0.74]
Internet: w8sdz@WSMR-SIMTEL20.Army.Mil, w8sdz@brl.arpa  BITNET: w8sdz@NDSUVM1
Uucp: {ames,decwrl,harvard,rutgers,ucbvax,uunet}!wsmr-simtel20.army.mil!w8sdz

roy@comcon.UUCP (Roy M. Silvernail) (12/15/89)

In article <KPETERSEN.12550131182.BABYL@WSMR-SIMTEL20.ARMY.MIL>, w8sdz@WSMR-SIMTEL20.ARMY.MIL (Keith Petersen) writes:
> 
> The following Unix shell script "lcombine" is functionally the same as the
> comp.binaries.ibm.pc "combine" script.  Use it to uudecode multiple-part
> uuencoded files received from LISTSERV (or TRICKLE in Europe).
> 
> #! /bin/sh
> cat $* | sed '/--- End /,/--- Part/d' | uudecode
> 

At my site, our version of uudecode doesn't like the LISTSERV flavor of
uuencoded files. (LISTSERV places the M at both ends of the line,
instead of the beginning only) So, I have modified the script above to
the following:


 cat $* | sed '/--- End /,/--- Part/d' | sed 's/M$//'| uudecode

That will avoid the "Checksum error decoding line x" message for every
file, but preserve any other error messages, such as abnormal
termination.

The alternative is to add '2|grep -v checksum' or '2>err' and tail err for
any unusual conclusions.

-- 
_R_o_y _M_. _S_i_l_v_e_r_n_a_i_l  | UUCP: uunet!comcon!roy  |  "No, I don't live in an igloo!"
[ah, but it's my account... of course I opine!]           -Sourdough's riposte
SnailMail: P.O. Box 210856, Anchorage, Alaska, 99521-0856, U.S.A., Earth, etc.