[comp.sys.amiga] uudecode blues

wayne@utflis.UUCP (07/05/87)

I am having problems transferring large binary files to my Amiga
from a 4.2BSD UNIX Vax.  These files were pulled off the net in a 
uuencoded format, compressed, stored, uncompressed, and uudecoded. 
They were then xmodem'ed and/or kermited to the Amiga, which refused 
to believe that these were object files.

I have no problems transferring smaller files like Robotroff or Pearl,
but I can't seem to get med or GravityWars to work on the Amiga.  I DO
make sure that the files end in (hex)F2 by using tailrid to modify them
as necessary.

I am really puzzled and worried by this, since the juiciest programs are
usually the biggest ones.  I would really appreciate any help I can get.
Please email to me or post to the net as you see fit.


wayne

ugmiker@sunybcs.uucp (Michael Reilly) (07/06/87)

In article <736@utflis.UUCP> wayne@utflis.UUCP (Wayne Young) writes:
>I am having problems transferring large binary files to my Amiga
>from a 4.2BSD UNIX Vax.  These files were pulled off the net in a 
>uuencoded format, compressed, stored, uncompressed, and uudecoded. 
>They were then xmodem'ed and/or kermited to the Amiga, which refused 
>to believe that these were object files.
>
>wayne

your problem might be compressing uuencoded files,try decoding the files before
you compress them, or arc them.  I find arc the best packaging system for send-
ing files, it protects them(sort of... I think..).
Here are two shell scripts I use for doing all of my sharing, uudecoding, and 
arcing up for transfer to the amiga from a vax 11/785 running unix 4.3BSD.
The first script does all the work in a subdirectory of the directory you call
the command from, the second one (for you quota conscious people) uses the 
/tmp directory to do all the work.  They both do the same thing, but one in
tmp and one not.  
	All you have to do is pick where you want the file manipulation done,
then run the script with the name of the file just taken off the net.  The only
thing that must be done manually (as of now) is that you must cut off the header
of the file, ie, cut where person says "cut here".  I like to run it in the 
background and forget about it, I hated always having to shar, then look for
files with .uue at the end, then arcing everything together, now just one 
command does it all.  I am (hopefully soon) going to fix the script so it cuts
off the header, but that could get messy because everyone says "cut here"  
differently...

	hope you find these helpful

					mike(r)

p.s. the files are heavily(too heavily) commented, wipe out the comments and the
     files are tiny.




---CUT HERE---THIS DOES WORK IN SUBDIR---CUT HERE---THIS DOES WORK IN SUBDIR---
#!/bin/csh
mkdir $1.dir
cp $1 $1.dir/.
# make a subdirectory and copy the main file to it , this  makes arcing 
# all files in the directory easier.
cd $1.dir
chmod u+x $1
$1
rm $1
# get into the directory, make the shar executable, then execute it and remove
# the shar file.
set uus = `ls *.uue *.uu`
foreach file ($uus)
 uudecode $file
 rm $file
end 
# any uuencoded file must be uudecode and then the .uue/.uu file removed to make
# arcing easier  
arc an {$1}.arc *
mv {$1}.arc ../{$1}.arc
# add all files to arc named as the original filename with the .arc postfix
# then mv that file to the original directory.
cd ..
rm $1.dir/*
rmdir $1.dir
# then move up to the parent directory and remove the all the 
# files in the lower directory,then remove that lower directory to keep
# things clean, and keep your quota down.

----CUT HERE----THIS DOES WORK IN /TMP ----CUT HERE----THIS DOES WORK IN /TMP---
#!/bin/csh
mkdir /tmp/$1.dir
cp $1 /tmp/$1.dir/.
# make a directory in /tmp and copy the main file to it , this  makes arcing 
# all files in the directory easier.
cd /tmp/$1.dir
chmod u+x $1
$1
rm $1
# get into the directory, make the shar executable, then execute it and remove
# the shar file.
set uus = `ls *.uue *.uu`
foreach file ($uus)
 uudecode $file
 rm $file
end 
# any uuencoded file must be uudecoded and then the .uue/.uu 
# arcing easier file removed to make
arc an {$1}.arc *
mv {$1}.arc ~/{$1}.arc
# add all files to arc named as the original filename with the .arc postfix
# then mv that file to the original directory.
cd 
rm /tmp/$1.dir/*
rmdir /tmp/$1.dir
# then move up to the original directory and remove the all the 
# files in the lower directory,then remove that /tmp directory to keep
# things clean.
================================================================================
        	             Mike Reilly                              //
                             ---- ------                             // 
                   University of Buffalo Computer Science      AMIGA//  
                   ---------- -- ------- -------- -------        \\//  
                   csnet:	ugmiker@buffalo.CSNET             \/     
                   uucp:	..!{nike|watmath,alegra,decvax}!sunybcs!ugmiker
                   BITNET:	ugmiker@sunybcs.BITNET, v107ln7z@ubvmsa.bitnet
================================================================================

stever@videovax.Tek.COM (Steven E. Rice, P.E.) (07/07/87)

In article <736@utflis.UUCP>, wayne@utflis.UUCP (Wayne Young) writes:

> I am having problems transferring large binary files to my Amiga
> from a 4.2BSD UNIX Vax.  These files were pulled off the net in a 
> uuencoded format, compressed, stored, uncompressed, and uudecoded. 
> They were then xmodem'ed and/or kermited to the Amiga, which refused 
> to believe that these were object files.
> 
> I have no problems transferring smaller files like Robotroff or Pearl,
> but I can't seem to get med or GravityWars to work on the Amiga.  . . .

I have successfully transferred both ASCII and binary files from our
4.2BSD UNIX VAX to my Amiga with Kermit.  One thing that helps is to send
the files from the VAX in uuencoded form and then uudecode them on the
Amiga.  There are several versions of uudecode on the Fish Disks.  (I
believe one of the later ones is on Fish Disk #53.)

The other help I have is a set of C-shell scripts that generate transfer
control files ("take files") for Amiga Kermit and a check directory on
the VAX.  Each file is tranferred to the Amiga and then back to the
associated check directory on the VAX.  Transfer integrity can then be
tested by

      diff -crs <directory> <directory>.check | more

(each file is mentioned by name, even if both copies are identical), or

      diff -cr <directory> <directory>.check | more

(only subdirectories, differences, and unique files are mentioned).

I have found most transfers to be correct.  There are some problems,
however.  Kermit has the problem of occasionally dropping the last
newline in a file (I run image mode, since both UNIX and the Amiga use
newline as the line terminator, and there is no good reason to translate
to CR/LF and then back.)  And if I forget to specify binary transfer mode
for a binary file (I have very few of them, since I uudecode on the
Amiga. . .), I have to transfer that file over again.  But I *know* I
have to, because when a transfer fails, the file in "<directory>.check"
is not the same as the original!!!

I offered to post the shell scripts a few months back, but only had four
(4) requests, so I mailed them instead.  If you think they might be useful,
send me email.

					Steve Rice

-----------------------------------------------------------------------------
new: stever@videovax.tv.Tek.com
old: {decvax | hplabs | ihnp4 | uw-beaver | cae780}!tektronix!videovax!stever

daveh@cbmvax.UUCP (Dave Haynie) (07/13/87)

in article <4476@videovax.Tek.COM>, stever@videovax.Tek.COM (Steven E. Rice, P.E.) says:
> Summary: Transfer uuencoded; uudecode on the Amiga

> I have successfully transferred both ASCII and binary files from our
> 4.2BSD UNIX VAX to my Amiga with Kermit.  One thing that helps is to send
> the files from the VAX in uuencoded form and then uudecode them on the
> Amiga.  There are several versions of uudecode on the Fish Disks.  (I
> believe one of the later ones is on Fish Disk #53.)

That works OK, and that's the way I used to do it.  But it takes longer
to send the UUENCODED file over (even at the 9600 baud I use here all the
time).  The largest problem folks seem to have with Kermit is setting the
modes correctly on both ends of the transfer.  To send binaries, you must
specify image mode on both sides of the transfer.  To send text, you
could set text transfers.  Only this is, IMAGE mode is really defined by
Kermit to mean binary OR UNIX-to-UNIX transfer of text.  Since the Amiga's
text file look just like UNIX text files, the Amiga is UNIX as far as 
Kermit is concerned.  So what I do is set Kermit on both sides to default
to image mode.  Since I set it up this way, I haven't had a single problem
running binaries UUDECODED on out VAX.
-- 
Dave Haynie     Commodore-Amiga    Usenet: {ihnp4|caip|rutgers}!cbmvax!daveh
"The A2000 Guy"                    PLINK : D-DAVE H             BIX   : hazy
     "Catch a wave and you're sittin' on top of the world" -Beach Boys