Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site hyper.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!stolaf!mmm!umn-cs!hyper!mark From: mark@hyper.UUCP (Mark Mendel) Newsgroups: net.sources Subject: tarmail enhancement Message-ID: <291@hyper.UUCP> Date: Mon, 24-Feb-86 20:05:48 EST Article-I.D.: hyper.291 Posted: Mon Feb 24 20:05:48 1986 Date-Received: Fri, 28-Feb-86 22:21:20 EST Distribution: net Organization: Network Systems Corp., Mpls., Mn. Lines: 68 Brief summary of tarmail: Part of the compress 4.0 distribution included nifty shell scripts tarmail and untarmail. These allow entire directory hierarchies to be tar-ed, compressed, converted to ascii (more compactly than uuencode) and mailed. Enhancement: Many mailers will refuse very large mail. I have added split into the chain, dividing the mail into 700 line mailings. Each piece of mail is about 55K. Usage: tarmail "mail subject" path!to!joe files_and_directories... The receiver must save the mail in part number order to one or more files. Then it types: (yes, types it does, 'cause it's not sexist...) untarmail parts1-2 parts3-7 ... The compress 4.0 distribution is available from the mod.sources archive, not me. #---------------------------- CUT HERE ---------------------------------- #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # bin/tarmail # bin/untarmail echo Extracting bin/tarmail sed 's/^X//' << 'SHAR_EOF' > bin/tarmail X Xif test $# -lt 3; then X echo "Usage: tarmail mailpath \"subject-string\" directory-or-file(s)" X exit Xelse X mailpath=$1 X echo "mailpath = $mailpath" X shift X subject="$1" X echo "subject-string = $subject" X shift X echo files = $* X tar cvf - $* | compress | btoa | split -700 - /tmp/tm$$ X n=1 X set /tmp/tm$$* X for f do X { X echo '---start beef' X cat $f X echo '---end beef' X } | Mail -s "$subject - part $n of $#" $mailpath X n=`expr $n + 1` X done X rm /tmp/tm$$* Xfi SHAR_EOF echo Extracting bin/untarmail sed 's/^X//' << 'SHAR_EOF' > bin/untarmail Xif test $# -ge 1; then X sed '/^---end beef/,/^---start beef/d' $* | atob | uncompress | tar xvpf - X mv $1 /usr/tmp/$1.$$ X echo tarmail file moved to: /usr/tmp/$1.$$ Xelse X sed '/^---end beef/,/^---start beef/d' | atob | uncompress | tar xvpf - Xfi SHAR_EOF exit