🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #3816

Re: how 2 send mac binarys via unix?

#3816
From: Jeff Hallett x4-6328
Date: Thu, 31 Aug 1989 13:34
134 lines
4425 bytes
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
Technical Details
Message-ID: <950@mrsvr.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.csd.uwm.edu!mrsvr.UUCP!shoreland.uucp!hallett
References: <1586@hjuxa.UUCP> <1514@draken.nada.kth.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.csd.uwm.edu!mrsvr.UUCP!shoreland.uucp!hallett
From: hallett@shoreland.uucp (Jeff Hallett x4-6328)
Newsgroups: comp.sys.mac
Subject: Re: how 2 send mac binarys via unix?
Keywords: unix mac xfer
Message-ID: <950@mrsvr.UUCP>
Date: 31 Aug 89 13:34:52 GMT
References: <1586@hjuxa.UUCP> <1514@draken.nada.kth.se>
Sender: news@mrsvr.UUCP
Reply-To: hallett@shoreland.UUCP (Jeff Hallett x4-6328)
Organization: GE Medical Systems, Milwaukee,  WI
Lines: 134