pzl@hjuxa.UUCP (Twisted Systems Inc.) (08/29/89)
What is the best way for someone send mac binarys to me via unix mail or uucp? Ive been doing this for IBM binaries and the sequence has been: 1- pkarc the file on the pc 2- upload the file via kermit to unix 3- uuencode the file on unix 4- compress the file 5- uuto the file to the other guy 6- he uncompresses it and downloads the file to his PC 7- on the PC he uudecodes it and pkxarcs it. Whats the equivalent Mac sequence?
d88-jwa@nada.kth.se (Jon W{tte) (08/30/89)
In article <1586@hjuxa.UUCP> pzl@hjuxa.UUCP (Twisted Systems Inc.) writes: >What is the best way for someone send mac binarys >to me via unix mail or uucp? >1- pkarc the file on the pc >2- upload the file via kermit to unix >3- uuencode the file on unix >4- compress the file >5- uuto the file to the other guy Uh... doesn't uuto uuencode the file? Why then uuencode previous to the compression ? Compress does a very handy work on binary files, so the uuencode would not be necessary. I think it increases redundancy used this way. Anyway, the standard, used-by all method is packing your files in an Archive using StuffIt 1.5.1 (for instance - this is the DeFacto standard) and then, using the same program or BinHex 4.0 (I know there's a 5.0, but everybody uses 4.0 or 4.0-compatibel StuffIt) to encode the archive in ASCII read-onlys. Upload to the UNIX machine, mail (in cut-off pieces, that are smaller than 100k each) and the receiver should have no problem trimming the headers off, paste together the pieces (either on the Mac or in emacs on the UNIX machine), deBinHex it and unStuffIt it. Complete with icons and all. Happy Hacking ! -- This is your fortune from h+@nada.kth.se: Reality's the only obstacle to happiness.
hallett@shoreland.uucp (Jeff Hallett x4-6328) (08/31/89)
In article <1514@draken.nada.kth.se> d88-jwa@nada.kth.se (Jon W{tte) writes: >In article <1586@hjuxa.UUCP> pzl@hjuxa.UUCP (Twisted Systems Inc.) writes: >>What is the best way for someone send mac binarys >>to me via unix mail or uucp? [deleted various exortations on using Stuffit and BinHex-compatible] Uploading and downloading ASCII is longer and slower than uploading and downloading MacBinary format. My recommendation is: 1. Have your friend upload the stuff using something like Zterm or NCSA Telnet/FTP in MacBinary. This should leave you a binary encoded file on the UNIX host. 2. A friend of mine and I use the following set of scripts to mail MacBinary files back and forth. The first takes a bunch of MacBinary files and mails them out. The second takes a bunch of received pieces and puts them together. --------8<--------- #!/bin/csh # usage: mailpkg <mail-address> <directory> [<subject>] # requires the btoa program switch ($#argv) case 0: case 1: echo "usage: mailpkg <mail-address> <directory> [<subject>]" exit 1 breaksw case 2: set SUBJ = "Package" breaksw case 3: set SUBJ = "$3" breaksw default: echo "usage: mailpkg <user> <directory> [<subject>]" exit 1 endsw # # # if ($2 == ".") then set FILE = "Package" else set FILE = $2:t set FILE = $FILE:r endif echo "Using temporary file /tmp/$FILE..." # # Create the temporary TAR file # if (! (-d $2)) then echo "package: Directory $2 does not exist, aborting..." exit endif tar chvf - $2 | compress -c | btoa > /tmp/$FILE # # Split the file and mail it out # pushd /tmp split -1200 $FILE $FILE echo "File split. Mailing parts..." set n = `echo $FILE??` @ i = 1 foreach f ($FILE??) echo "$f : $SUBJ (part $i of $#n)" cat $f | mail -s "$SUBJ (part $i of $#n)" $1 @ i++ rm $f end echo "done" rm $FILE popd exit 0 ---------8<---------- #!/bin/csh # # Script to unpackage a package saved in files of the form "name??" # for Example, a package split across three files named Files01 Files02 Files03 # Give the basename of the package (in previous example, give "Files") # if (-f /tmp/$1.pkg) then echo -n "Intermediate package file, /tmp/$1.pkg, exists. Overwrite? [n]" if ($< =~ y*) then if (! (-o /tmp/$1.pkg)) then echo " You are not the owner. Aborting..." exit endif \rm -f /tmp/$1.pkg echo " Package file /tmp/$1.pkg removed...continuing" else echo " Aborting..." exit endif endif # echo "Removing mail headers..." foreach file (`ls $1??`) echo " Stripping $file..." awk -f /usr/saturn/hallett/Macintosh/strip-mail.awk $file >> /tmp/$1.pkg end # echo "Unpackaging /tmp/$1.pkg..." cat /tmp/$1.pkg | atob | uncompress | tar xvf - >& $1.catalog # echo "Removing package file, /tmp/$1.pkg..." \rm /tmp/$1.pkg echo "Done" --------8<--------- Usage would be for your friend to accumulate the stuff in a directory.Then, in that directory, type: mailpkg pzl@hjuxa.UUCP . "Some Stuff for you..." You would then get some parts and save them in the form nameDD. For example, you there were 5 parts you would save the parts in the files Stuff01, Stuff02, Stuff03, Stuff04, Stuff05. Then, in the same directory where the Stuff?? files are, you type: unpackage Stuff You will be left with the Stuff files, a file Stuff.catalog which lists all the files unpackaged and the packaged files, in MacBinary. You can then use whatever to download the MacBinary and translate it to Mac format again. (I use Zterm since it automatically translates the MacBinary on the fly). Hope this helps. -- Jeffrey A. Hallett, PET Software Engineering GE Medical Systems, W641, PO Box 414 Milwaukee, WI 53201 (414) 548-5163 : EMAIL - hallett@positron.gemed.ge.com
hallett@shoreland.uucp (Jeff Hallett x4-6328) (09/01/89)
In article <950@mrsvr.UUCP> hallett@shoreland.UUCP (Jeff Hallett x4-6328) writes: >#!/bin/csh ># ># Script to unpackage a package saved in files of the form "name??" ># for Example, a package split across three files named Files01 Files02 Files03 > awk -f /usr/saturn/hallett/Macintosh/strip-mail.awk $file >> /tmp/$1.pkg Ooooopps! I forgot to post the awk script. Here it is: -------8<--------- /^From/ {next} /^Return-Path:/ {next} /^Date:/ {next} /^To:/ {next} /^Subject:/ {next} /^In-Reply-To:/{next} /^$/ {next} {print} -------8<--------- Just save this as strip-mail.awk and fix the awk line in the unpackage script. Sorry for any confusion. -- Jeffrey A. Hallett, PET Software Engineering GE Medical Systems, W641, PO Box 414 Milwaukee, WI 53201 (414) 548-5163 : EMAIL - hallett@positron.gemed.ge.com