[comp.sys.atari.st] Is there a joiner for uuencoded file parts?

bpohl@dvorak.amd.com (Bion Pohl) (05/15/91)

	Is there a parts joining script for rejoining the parts of a uuencoded 
binary or source file before uudecoding?  I've just been doing it by hand and
I'm getting tired of it, cutting out the header and comments, etc.  I wand 
something that will take all the mailed/posted part and make one .uue file I 
can send to our VAX for uudecoding (the uudecode on the SUN tends not to work).

	I don't want to bother doing my own if someone has one that works (UNIX
is still new to me).  If you have one that you like, please e-mail it or post 
it.  I can't ftp off site so I'd need it SENT TO me.

	Thanks for the help.

					SLATFATF,
						Bion

plinio@crowe.seas.ucla.edu (Plinio Barbeito) (05/15/91)

In article <1991May14.192458.19903@dvorak.amd.com> bpohl@dvorak.amd.com (Bion Pohl) writes:
>
>	Is there a parts joining script for rejoining the parts of a uuencoded 
>binary or source file before uudecoding?  I've just been doing it by hand and

I've been using the awk script that follows on our Unix systems 
successfully for quite a while.  If you run it on a file that has all 
the parts of a distribution in it in numerical order, it'll strip the 
extraneous stuff out of it and output a file suitable for uudecoding.


To use it, you can paste it into a file called 'stripuue.awk', copy it 
into your News directory, and add this line to your .cshrc:

alias strip 'awk -f ~/News/stripuue.awk'

(To be able to use the shell alias immediately, type "source .cshrc" at 
the csh prompt.)

Thereafter, when you save a set of binaries/sources with the 's' 
command, you can use the same filename for each to effectively 
concatenate all the parts into one file (but make sure they are cat'ed 
in the correct order...sometimes part03 comes before part02, etc.)  

Then you can just type something like:

strip filename > stripped.filename

and you should be able to uudecode the "stripped.filename" at that
point without problems.


'stripuue.awk' follows:

-------Delete everything above this line, inclusive----------------
BEGIN { mode=0  }
$1!="table" && mode==0 { }
$1=="table" && mode==0 { mode=1; print $0 }
mode==1 && $1!="table" && $1!="include" { print $0 }
$1=="include" && mode==1 { mode=2; }
$1=="include" && mode==0 { mode=2; }
$1=="begin" && mode==2 { mode=1 }
-------Delete everything below this line, inclusive----------------

plin
--
To mak wridin mo eficiend, i sujes de folouin janjs: drop deleder 'c', as 
'k' uil do jus fin.  gt rid of endn 'e', sins ids nevr pronncd aniuai.  als, 
't' is nevr nedd; us 'd'.  repeddv knsnnds shd b nls bpp ngbbl rr...01011101

silvert@cs.dal.ca (Bill Silvert) (05/15/91)

In article <1991May14.192458.19903@dvorak.amd.com> bpohl@dvorak.amd.com (Bion Pohl) writes:
>
>	Is there a parts joining script for rejoining the parts of a uuencoded 
>binary or source file before uudecoding?  I've just been doing it by hand and
>I'm getting tired of it, cutting out the header and comments, etc.  I wand 
>something that will take all the mailed/posted part and make one .uue file I 
>can send to our VAX for uudecoding (the uudecode on the SUN tends not to work).

The Dumas uudecode with additions by myself and others will decode these
files without editing out the headers (assuming that they are properly
encoded).  The file can be in one or multiple files.

It is available by anonymous ftp from cs.dal.ca in pub/bio/uud.tar.Z


-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biome!silvert
BITNET=silvert%biome%dalcs@dalac	InterNet=silvert%biome@cs.dal.ca

rosenkra@convex.com (William Rosencranz) (05/15/91)

In article <1991May14.192458.19903@dvorak.amd.com> bpohl@dvorak.amd.com (Bion Pohl) writes:
>
>	Is there a parts joining script for rejoining the parts of a uuencoded 
>binary or source file before uudecoding?  I've just been doing it by hand and

here is what i use, a unix csh script which calls the "dumas" uudecode
(here called uude). it unpacked every binary/source posted to c.s.a.st
and c.b.a.st:

#!/bin/csh
#
# NAME
#	uud.sh -- script for uudecoding a split file
#
# SYNOPSIS
#	uud file1 file2 ...
#

set file=$1
echo "doing file $1 (first one)..."

if ( $#argv > 1 ) then
#	sed -e '1,/^@ABCDEFG/d' -e '/^include/,$d' $file > x.uue
#	some files don't have "@ABCD..." so find a line starting with "begin"
#	and print it. then delete from start to (and including) that line
	sed -e '/^begin/p' -e '1,/^begin/d' -e '/^include/,$d' $file > x.uue
	shift
	foreach file ($*)
		echo "doing file $file ..."
		sed -e '1,/^begin/d' -e '/^include/,$d' $file >> x.uue
	end
else
#	sed -e '1,/^@ABCDEFG/d' $file > x.uue
	sed -e '/^begin/p' -e '1,/^begin/d' $file > x.uue
endif
unset file
echo "doing uude x.uue..."
uude x.uue
echo "done."
/bin/rm -i x.uue
exit

-bill
rosenkra@convex.com
--
Bill Rosenkranz            |UUCP: {uunet,texsun}!convex!c1yankee!rosenkra
Convex Computer Corp.      |ARPA: rosenkra%c1yankee@convex.com

Roger.Sheppard@bbs.actrix.gen.nz (05/16/91)

In article <1991May14.192458.19903@dvorak.amd.com> bpohl@dvorak.amd.com (Bion Pohl) writes:
> 
> 	Is there a parts joining script for rejoining the parts of a uuencoded 
> binary or source file before uudecoding?  I've just been doing it by hand and
> I'm getting tired of it, cutting out the header and comments, etc.  I wand 
> something that will take all the mailed/posted part and make one .uue file I 
> can send to our VAX for uudecoding (the uudecode on the SUN tends not to work).
> 
> 	I don't want to bother doing my own if someone has one that works (UNIX
> is still new to me).  If you have one that you like, please e-mail it or post 
> it.  I can't ftp off site so I'd need it SENT TO me.
> 
> 	Thanks for the help.
> 
> 					SLATFATF,
> 						Bion

I do have a UUdec that works with the Headers etc, you can append all
the volumes together, no cutting needed..
-- 
Roger W. Sheppard   85 Donovan Rd, Kapiti New Zealand...

ralph@laas.fr (Ralph P. Sobek) (05/16/91)

Sorry, I do not understand this shell script.  Don't all versions of
Dumas' uud strip extraneous headers and trailers from uuencoded files?
The problem arises with all the nonstandard decoders/encoders that
exist.  

I use GNUS for reading, and I call uud directly from the Article
buffer in the case that the encoding is complete.  Otherwise, if the
article is recognized as a `uud' part, then the proper named part file
is automatically saved.

Cheers,

--
Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
ralph@laas.fr				   Addresses are ordered by importance.
ralph@laas.uucp, or ...!uunet!laas!ralph		
If all else fails, try:				      sobek@eclair.Berkeley.EDU
===============================================================================
Proud owner of a Mega 4 ST.  Wishing it was a Mega STe!  :-|

wolf@fb14vax.sbsvax.uucp (Wolfgang Huwig) (05/16/91)

In article <1991May14.192458.19903@dvorak.amd.com> bpohl@dvorak.amd.com (Bion Pohl) writes:

>       Is there a parts joining script for rejoining the parts of a uuencoded 
>binary or source file before uudecoding?  I've just been doing it by hand and
>I'm getting tired of it, cutting out the header and comments, etc.  I wand 
>something that will take all the mailed/posted part and make one .uue file I 
>can send to our VAX for uudecoding (the uudecode on the SUN tends not to work).

You can use a simple sed command to do just what you want:

cat myfile.u?? | sed /^include/,/^begin/d > myfile.myuue

Cat will get the files in alphabetic order, sed strips all the
lines between "include myfile..." and "begin part..." (inclusively).
The resulting file will still contain the lines before the first
"begin..." but uudecode doesn't bother with that.
(Be sure to name the resulting file so it doesn't get an argument
to cat, too :-)
You can set yourself an alias for the command sequence above or
make it a shell script.

Greetings,
 Wolfgang
--

+-------------------+------------------+-----------------------------+
| Wolfgang Huwig    |   intelligent    | FB 14 Informatik IV         |
| CS Dept./AI Lab   |      remark      | Universitaet des Saarlandes |
| wolf@cs.uni-sb.de |    goes here     | D-6600 Saarbruecken 11      |
+-------------------+------------------+-----------------------------+

ralph@laas.fr (Ralph P. Sobek) (05/17/91)

In article <1991May16.120052.15005@actrix.gen.nz> Roger.Sheppard@bbs.actrix.gen.nz writes:
|  I do have a UUdec that works with the Headers etc, you can append all
|  the volumes together, no cutting needed..

A long time ago, someone posted here or the info-atari16 digest, that
they had a modified Dumas' uud, which accepts the multi-part files all
concatenanted into one stream.  Does anyone have this?
--
Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
ralph@laas.fr				   Addresses are ordered by importance.
ralph@laas.uucp, or ...!uunet!laas!ralph		
If all else fails, try:				      sobek@eclair.Berkeley.EDU
===============================================================================
Proud owner of a Mega 4 ST.  Wishing it was a Mega STe!  :-|

os9paul@gkcl.ists.ca (Paul Good) (05/20/91)

In article <RALPH.91May17122045@orion.laas.fr> ralph@laas.fr (Ralph P. Sobek) writes:
>A long time ago, someone posted here or the info-atari16 digest, that
>they had a modified Dumas' uud, which accepts the multi-part files all
>concatenanted into one stream.  Does anyone have this?

Get the file 'uux789.zoo' from atari.archive.umich.edu in the archivers
directory.  It contains TOS executables uud.ttp and uue.ttp.  It also has
source code for both the encoder and decoder that may be compiled under
GEM, UNIX, and MS-DOS.

The uud will work with multi-part files that are concatenated in order.  It
also works if the files are just in the same directory as the first file
provided they are properly named.

There is a doc file included.

I use these programs on my ST and on the UNIX box here.  My only 'complaint'
is that sequence checking is only done on the first file of a multi-file set.
However, it hasn't bothered me enough to get me to look at the sources to fix
it. 8^)

--
Paul Good   INTERNET: os9paul@gkcl.ists.ca  UUCP: ...!ists!gkcl.ists.ca!os9paul

acook@athena.mit.edu (Andrew R Cook) (05/22/91)

I have some code that I wrote that will get rid of all the crap in catted
together uuencoded files.  Usually I just pipe the output to uudecode, but you
can indirect it to a file if you like.  It seems to work fine, I haven't had any
problems.  If you want it, email me, and I'll send it out (source). 

Andy Coook
acook@athena.mit.edu

jdp@engr.uark.edu (Dalton Porter) (05/30/91)

acook@athena.mit.edu (Andrew R Cook) writes:

>I have some code that I wrote that will get rid of all the crap in catted
>together uuencoded files.  Usually I just pipe the output to uudecode, but you
>can indirect it to a file if you like.  It seems to work fine, I haven't had any
>problems.  If you want it, email me, and I'll send it out (source). 
>
>Andy Coook
>acook@athena.mit.edu

If this one isn't sufficient let me know and I'll send you mine.

Combine file0? --> one output file that's decoded.

Dalton Porter
jdp@engr.uark.edu

ljdickey@watmath.waterloo.edu (L.J.Dickey) (05/30/91)

In article <RALPH.91May16151116@orion.laas.fr> ralph@laas.fr (Ralph P. Sobek) writes:
>Sorry, I do not understand this shell script.  Don't all versions of
>Dumas' uud strip extraneous headers and trailers from uuencoded files?
>The problem arises with all the nonstandard decoders/encoders that
>exist.  

Ralph is right.
One does not need such a complicated script.  UUD will ignore the
parts that it does not need.  It jumps from the "include", past
the mail or news header, and straight to the next "begin" line.
A good command line might be like this: 

	cat somebigf.u?? | uud


Silvert's adaptation of the Dumas' code is great.
Highly recommended.
-- 
Prof L.J. Dickey, Faculty of Mathematics, U of Waterloo, Canada N2L 3G1
internet:       ljdickey@watmath.UWaterloo.ca	BITNET/EARN:	ljdickey@watdcs
obsolescent?:	ljdickey@watmath.waterloo.edu
UUCP:		ljdickey@watmath.UUCP	..!uunet!watmath!ljdickey

steve@thelake.mn.org (Steve Yelvington) (05/31/91)

[In article <1991May30.035220.23253@watmath.waterloo.edu>,
     ljdickey@watmath.waterloo.edu (L.J.Dickey) writes ... ]

 > In article <RALPH.91May16151116@orion.laas.fr> ralph@laas.fr (Ralph P. Sobek) writes:
 >>Sorry, I do not understand this shell script.  Don't all versions of
 >>Dumas' uud strip extraneous headers and trailers from uuencoded files?
 >>The problem arises with all the nonstandard decoders/encoders that
 >>exist.  
 > 
 > Ralph is right.
 > One does not need such a complicated script.  UUD will ignore the
 > parts that it does not need.  It jumps from the "include", past
 > the mail or news header, and straight to the next "begin" line.
 > A good command line might be like this: 
 > 
 > 	cat somebigf.u?? | uud
 > 
 > 
 > Silvert's adaptation of the Dumas' code is great.
 > Highly recommended.

Bill's version works fine, but I also have an older UUD that chokes
if there's too much junk between include and begin.

Remember the GEM-based uuencoder/uudecoder that I mentioned I was
working on? Somehow, in ripping the decoder out of WD.C, I managed
to break that feature; my program now won't manage concatenated files
that include lots of trash. As soon as I have the right combination
of spare time and caffeine I should be able to get it fixed and post
the program to comp.binaries and comp.souces.

 ----
 Steve Yelvington, Marine on St. Croix, Minnesota, USA / steve@thelake.mn.org