home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-03 | 62.7 KB | 2,086 lines |
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: Configure README README2.7 TODO joinr.SH mailsplit.SH
- # undoc joinr.1 mailsplit.1
- # Wrapped by wyle@lavi on Wed Mar 28 10:14:08 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Configure' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Configure'\"
- else
- echo shar: Extracting \"'Configure'\" \(15368 characters\)
- sed "s/^X//" >'Configure' <<'END_OF_FILE'
- X#! /bin/sh
- X#
- X# Configure shell script for mailsplit
- X#
- X# @(#)Configure 2.6 88/08/20 M F Wyle
- X#
- X# "Yes, you may rip this off to use in other distribution packages."
- X# -Larry Wall-
- X#
- X# Thanks Larry I did! -Mitch
- X#
- X# If your sh doesn't like these # comments, nuke them. You must
- X# also get rid of the # comments in mailsplit and joinr.
- X#
- X# $Id: Configure,v 1.5 90/02/07 12:05:00 yamanaka Rel $
- X#
- Xpackage=mailsplit
- X
- X: sanity checks
- XPATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:/usr/ucb/bin:/usr/old'
- Xexport PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed
- Xmyself to sh."; sh $0; kill $$)
- X
- Xif test ! -t 0; then
- X echo "Say 'sh Configure', not 'sh <Configure'"
- X exit 1
- Xfi
- X
- X(alias) >/dev/null 2>&1 && \
- X echo "(I see you are using the Korn shell. Some ksh's blow up on
- XConfigure," && \
- X echo "especially on exotic machines. If yours does, try the Bourne shell
- Xinstead.)"
- X
- Xecho "creating a work directory named UU"
- Xif test ! -d UU; then
- X mkdir UU
- Xfi
- Xcd UU
- X
- X: We must find out about Eunice early
- Xeunicefix=':'
- Xif test -f /etc/unixtovms; then
- X eunicefix=/etc/unixtovms
- Xfi
- Xif test -f /etc/unixtovms.exe; then
- X eunicefix=/etc/unixtovms.exe
- Xfi
- X
- X: some greps do not return status, grrr.
- Xecho "grimblepritz" >grimble
- Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
- X contains=contains
- Xelif grep grimblepritz grimble >/dev/null 2>&1 ; then
- X contains=grep
- Xelse
- X contains=contains
- Xfi
- Xrm -f grimble
- X: the following should work in any shell
- Xcase "$contains" in
- Xcontains*)
- X echo " "
- X echo "AGH! Grep doesn't return a status. Attempting remedial action."
- X cat >contains <<'EOSS'
- Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
- XEOSS
- Xchmod +x contains
- Xesac
- X
- X: first determine how to suppress newline on echo command
- Xecho "Checking echo to see how to suppress newlines..."
- X(echo "hi there\c" ; echo " ") >.echotmp
- Xif $contains c .echotmp >/dev/null 2>&1 ; then
- X echo "...using -n."
- X n='-n'
- X c=''
- Xelse
- X cat <<'EOM'
- X...using \c
- XEOM
- X n=''
- X c='\c'
- Xfi
- Xecho $n "Type carriage return to continue. Your cursor should be here-->$c"
- Xread ans
- Xrm -f .echotmp
- X
- X: now set up to do reads with possible shell escape and default assignment
- Xcat <<EOSC >myread
- Xcase "\$fastread" in
- Xyes) ans=''; echo " " ;;
- X*) ans='!';;
- Xesac
- Xwhile expr "X\$ans" : "X!" >/dev/null; do
- X read ans
- X case "\$ans" in
- X !)
- X sh
- X echo " "
- X echo $n "\$rp $c"
- X ;;
- X !*)
- X set \`expr "X\$ans" : "X!\(.*\)\$"\`
- X sh -c "\$*"
- X echo " "
- X echo $n "\$rp $c"
- X ;;
- X esac
- Xdone
- Xrp='Your answer:'
- Xcase "\$ans" in
- X'') ans="\$dflt";;
- Xesac
- XEOSC
- X: set up shell script to do ~ expansion
- Xcat >filexp <<EOSS
- X$startsh
- X: expand filename
- Xcase "\$1" in
- X ~/*|~)
- X echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
- X ;;
- X ~*)
- X if $test -f /bin/csh; then
- X /bin/csh -f -c "glob \$1"
- X echo ""
- X else
- X name=\`$expr x\$1 : '..\([^/]*\)'\`
- X dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
- X if $test ! -d "\$dir"; then
- X me=\`basename \$0\`
- X echo "\$me: can't locate home directory for: \$name" >&2
- X exit 1
- X fi
- X case "\$1" in
- X */*)
- X echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
- X ;;
- X *)
- X echo \$dir
- X ;;
- X esac
- X fi
- X ;;
- X*)
- X echo \$1
- X ;;
- Xesac
- XEOSS
- Xchmod +x filexp
- X$eunicefix filexp
- X
- X
- X
- X: general instructions
- Xcat <<EOH
- X
- XThis installation shell script will examine your system and ask you
- Xquestions to determine how the $package package should be installed.
- XIf you get stuck on a question, you may use a ! shell escape to start a
- Xsubshell or execute a command. Many of the questions will have default
- Xanswers in square brackets--typing carriage return will give you the
- Xdefault.
- X
- XEOH
- Xrp="[Type carriage return to continue]"
- Xecho $n "$rp $c"
- X. myread
- X
- X
- X: find out where common programs are
- Xecho " "
- Xecho "Locating mailsplit component utility programs..."
- Xcat <<EOSC >loc
- X$startsh
- Xcase \$# in
- X0) exit 1;;
- Xesac
- Xthing=\$1
- Xshift
- Xdflt=\$1
- Xshift
- Xfor dir in \$*; do
- X case "\$thing" in
- X .)
- X if test -d \$dir/\$thing; then
- X echo \$dir
- X exit 0
- X fi
- X ;;
- X *)
- X if test -f \$dir/\$thing; then
- X echo \$dir/\$thing
- X exit 0
- X elif test -f \$dir/\$thing.exe; then
- X : on Eunice apparently
- X echo \$dir/\$thing
- X exit 0
- X fi
- X ;;
- X esac
- Xdone
- Xecho \$dflt
- Xexit 1
- XEOSC
- Xchmod +x loc
- X$eunicefix loc
- Xloclist="
- Xbasename
- Xcat
- Xtar
- Xrm
- Xsed
- Xmv
- Xawk
- Xhead
- Xpwd
- Xsplit
- Xcompress
- XMail
- Xtouch
- Xuuencode
- Xuudecode
- Xuncompress
- X"
- Xpth='. /bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin /etc /usr/new /usr/new/bin /usr/nbin /usr/ucb/bin /usr/old'
- X
- Xfor file in $loclist; do
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*)
- X echo $file is in $xxx.
- X ;;
- X *)
- X echo "I don't know where $file is. I hope it's in everyone's PATH."
- X ;;
- X esac
- Xdone
- Xcase "$test" in
- Xtest)
- X echo "Hopefully test is built into your sh."
- X ;;
- X/bin/test)
- X if sh -c "PATH= test true" >/dev/null 2>&1; then
- X echo "Using the test built into your sh."
- X test=test
- X fi
- X ;;
- X*)
- X test=test
- X ;;
- Xesac
- Xcase "$echo" in
- Xecho)
- X echo "Hopefully echo is built into your sh."
- X ;;
- X/bin/echo)
- X echo " "
- X echo "Checking compatibility between /bin/echo and builtin echo (if
- Xany)..." $echo $n "hi there$c" >foo1
- X echo $n "hi there$c" >foo2
- X if cmp foo1 foo2 >/dev/null 2>&1; then
- X echo "They are compatible. In fact, they may be identical."
- X else
- X case "$n" in
- X '-n') n='' c='\c' ans='\c' ;;
- X *) n='-n' c='' ans='-n' ;;
- X esac
- X cat <<FOO
- XThey are not compatible! You are probably running ksh on a non-USG system.
- XI'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
- Xhave echo built in and we may have to run some Bourne shell scripts. That
- Xmeans I'll have to use $ans to suppress newlines now. Life is ridiculous.
- X
- XFOO
- X rp="Your cursor should be here-->"
- X $echo $n "$rp$c"
- X . myread
- X fi
- X $rm -f foo1 foo2
- X ;;
- X*)
- X : cross your fingers
- X echo=echo
- X ;;
- Xesac
- Xrmlist="$rmlist loc"
- X
- X: see if sh knows # comments
- Xecho " "
- Xecho "Checking your sh to see if it knows about # comments..."
- Xif sh -c '#' >/dev/null 2>&1 ; then
- X echo "Your sh handles # comments correctly."
- X shsharp=true
- X spitshell=cat
- X echo " "
- X echo "Okay, let's see if #! works on this system..."
- X echo "#!/bin/echo hi" > try
- X $eunicefix try
- X chmod +x try
- X try > today
- X if $contains hi today >/dev/null 2>&1; then
- X echo "It does."
- X sharpbang='#!'
- X else
- X echo "#! /bin/echo hi" > try
- X $eunicefix try
- X chmod +x try
- X try > today
- X if test -s today; then
- X echo "It does."
- X sharpbang='#! '
- X else
- X echo "It doesn't."
- X sharpbang=': use '
- X fi
- X fi
- Xelse
- X echo "Your sh doesn't grok # comments--I will strip them later on."
- X shsharp=false
- X echo "exec grep -v '^#'" >spitshell
- X chmod +x spitshell
- X $eunicefix spitshell
- X spitshell=`pwd`/spitshell
- X echo "I presume that if # doesn't work, #! won't work either!"
- X sharpbang=': use '
- Xfi
- X
- X
- X: figure out how to guarantee sh startup
- Xecho " "
- Xecho "Checking out how to guarantee sh startup..."
- Xstartsh=$sharpbang'/bin/sh'
- Xecho "Let's see if '$startsh' works..."
- Xcat >try <<EOSS
- X$startsh
- Xset abc
- Xtest "$?abc" != 1
- XEOSS
- X
- Xchmod +x try
- X$eunicefix try
- Xif try; then
- X echo "Yup, it does."
- Xelse
- X echo "Nope. You may have to fix up the shell scripts to make sure sh runs
- Xthem."
- Xfi
- Xrm -f try today
- X
- X: determine where manual pages go
- Xcase "$mansrc" in
- X'')
- X dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
- X ;;
- X*) dflt="$mansrc"
- X ;;
- Xesac
- Xcont=true
- Xwhile $test "$cont" ; do
- X echo " "
- X rp="Where do the manual pages (source) go? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X mansrc=`filexp "$ans"`
- X if test -d $mansrc; then
- X cont=''
- X else
- X dflt=n
- X rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X dflt=''
- X case "$ans" in
- X y*) cont='';;
- X esac
- X fi
- Xdone
- Xcase "$mansrc" in
- X*l)
- X manext=l
- X ;;
- X*n)
- X manext=n
- X ;;
- X*C)
- X manext=C
- X ;;
- X*)
- X manext=1
- X ;;
- Xesac
- X
- X
- X: determine where public executables go
- Xcase "$bin" in
- X'')
- X dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
- X ;;
- X*) dflt="$bin"
- X ;;
- Xesac
- Xcont=true
- Xwhile $test "$cont" ; do
- X echo " "
- X rp="Where do you want to put the public executables? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X bin="$ans"
- X bin=`filexp $bin`
- X if test -d $bin; then
- X cont=''
- X else
- X dflt=n
- X rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X dflt=''
- X case "$ans" in
- X y*) cont='';;
- X esac
- X fi
- Xdone
- X:
- X: Variables and tuning parameters set here:
- X:
- Xecho " "
- Xdflt="/tmp"
- Xrp="In which directory should temporary files be created? [$dflt]"
- Xecho $n "$rp $c"
- X. myread
- XTD="$ans"
- X
- X:
- X: If uuencode not found, try btoa
- X:
- Xcase $uuencode in
- X uuencode)
- X echo " "
- X echo "Hmmm... I couldn't find uuencode anywhere; I'll look for btoa."
- X file="btoa"
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx instead of uuencode."
- X uuencode=$xxx ;;
- X *) echo "btoa not found either."
- X echo " "
- X dflt="uuencode"
- X rp="Neither uuencode nor btoa found; which shall I use [$dflt]?"
- X echo $n "$rp $c"
- X . myread
- X uuencode="$ans" ;;
- X esac ;;
- Xesac
- X
- XUUOPT=""
- Xcase $uudecode in
- X uudecode)
- X echo " "
- X echo "Hmmm... I couldn't find uudecode anywhere; I'll look for btoa -a."
- X file="btoa"
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx instead of uudecode."
- X uuencode=$xxx
- X UUOPT="-a" ;;
- X *) echo "btoa not found either."
- X echo " "
- X dflt="uudecode"
- X rp="Neither uudecode nor btoa found; which shall I use [$dflt]?"
- X echo $n "$rp $c"
- X . myread
- X uudecode="$ans" ;;
- X esac ;;
- Xesac
- X:
- X: If compress not found, try compact
- X:
- Xcompact="false"
- Xcase $compress in
- X compress)
- X echo " "
- X echo "Hmmm... I couldn't find compress anywhere; I'll look for compact."
- X file="compact"
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx instead of compress."
- X compress=$xxx
- X compact="true" ;;
- X *) echo "compact not found either."
- X echo " "
- X file="pack"
- X xxx=`lock $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx instead of compress."
- X compress=$xxx
- X compact="others" ;;
- X *) echo "pack not found either."
- X echo " "
- X dflt="compress"
- X rp="No compress, no compact and no pack found; which shall I use [$dflt]?"
- X echo $n "$rp $c"
- X . myread
- X compact="false"
- X compress="$ans" ;;
- X esac;;
- X esac ;;
- Xesac
- X:
- X: Likewise for uncompress and uncompact:
- X:
- Xcase $uncompress in
- X uncompress)
- X echo " "
- X echo "I couldn't find uncompress anywhere; I'll look for uncompact."
- X file="uncompact"
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx instead of uncompress."
- X uncompress=$xxx ;;
- X *) echo "uncompact not found either."
- X echo " "
- X file="unpack"
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx instead of uncompress."
- X uncompress=$xxx ;;
- X *) echo "unpack not found either."
- X echo " "
- X dflt="uncompress"
- Xrp="No uncompress, no uncompact and no unpack found; which should I use [$dflt]?"
- X echo $n "$rp $c"
- X . myread
- X uncompress="$ans" ;;
- X esac ;;
- X esac ;;
- Xesac
- X
- X:
- X: Set default bits for compress, file name extension, and command line flags
- X:
- Xcase $compact in
- X false)
- X echo " "
- X dflt="16"
- X rp="How many bits should $compress use (ok to guess) [$dflt]"
- X echo $n "$rp $c"
- X . myread
- X CB="$ans"
- X CF="\"-b $CB\""
- X CE="Z" ;;
- X true)
- X CE="C"
- X CF="" ;;
- X others)
- X CE="z"
- X CF="" ;;
- Xesac
- X:
- X: Check if Mail was found, if not use mail:
- X:
- XMS="Subj"
- Xcase $Mail in
- X Mail)
- X MS="Mist"
- X echo " "
- X echo "I couldn't find Mail anywhere; I'll try to use mailx..."
- X file="mailx"
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx."
- X Mail=$xxx ;;
- X *) echo " "
- X echo "I couldn't find mailx anywhere; I'll try to use mail..."
- X file="mail"
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*) echo "$file is in $xxx I'll use $xxx."
- X Mail=$xxx ;;
- X *) echo "mail not found either."
- X echo " "
- X dflt="mail"
- X rp="Neither mail nor Mail was found; which should I use [$dflt]?"
- X echo $n "$fp $c"
- X . myread
- X Mail="$ans" ;;
- X esac ;;
- X esac ;;
- Xesac
- X
- X# Strip dirnames here for compatibilities.
- X# Added by yamanaka@iias.fujitsu.co.jp
- X
- Xfor file in $loclist; do
- X xxx=`loc $file $file $pth`
- X eval $file=`basename $xxx`
- Xdone
- X
- X
- Xecho " "
- Xdflt="5"
- Xrp="What should the default debugging level be (ok to guess) [$dflt]"
- Xecho $n "$rp $c"
- X. myread
- XDB="$ans"
- X
- Xdflt="0"
- X
- Xcat << FOO
- X
- XSome mailers (a certain X.400 system with "MTA congestion problems"
- Xwill remain nameless) have trouble dealing with sudden, large bursts
- Xof messages. You might want to set the default delay to 5 or 10
- Xseconds if your mailer has such problems. Otherwise leave it at 0, the
- Xdefault.
- X
- XFOO
- X
- Xrp="What is the default delay (in seconds) between sending pieces [$dflt]"
- Xecho $n "$rp $c"
- X. myread
- XDE="$ans"
- X
- X
- Xecho " "
- Xdflt=''
- Xecho "If you didn't make any mistakes, then just type a carriage return here."
- Xrp="If you did, type ^C and start over."
- X$echo $n "$rp $c"
- X. myread
- Xecho " "
- X
- X:
- X: here goes!!
- X:
- X
- Xcp ../joinr.SH ./
- Xcp ../mailsplit.SH ./
- X. joinr.SH
- X. mailsplit.SH
- X
- Xecho " "
- Xdflt="n"
- Xrp="Would you like to install joinr and mailsplit in $bin now (y/n) "
- Xecho $n "$rp $c"
- X. myread
- Xcase $ans in
- X y|Y) cp ./joinr $bin/joinr
- X cp ./mailsplit $bin/mailsplit ;;
- Xesac
- X
- Xecho " "
- Xdflt="n"
- Xrp="Would you like to install the man pages $mansrc now (y/n) "
- Xecho $n "$rp $c"
- X. myread
- Xcase $ans in
- X y|Y) cp "../joinr.1" "$mansrc/joinr.$manext"
- X cp "../mailsplit.1" "$mansrc/mailsplit.$manext" ;;
- Xesac
- X
- Xcd ..
- X
- Xecho " "
- Xecho "saving joinr and mailsplit in `pwd`"
- Xmv UU/joinr ./joinr
- Xmv UU/mailsplit ./mailsplit
- X
- Xecho " "
- Xecho "removing my work directory UU."
- X$rm -rf UU
- END_OF_FILE
- if test 15368 -ne `wc -c <'Configure'`; then
- echo shar: \"'Configure'\" unpacked with wrong size!
- fi
- chmod +x 'Configure'
- # end of 'Configure'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(3102 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- Xmailsplit sends files and/or directories via e-mail using tar,
- Xcompress, etc. It sends an awk-script to re-assemble the pieces at the
- Xreceiving side. It is useful for sending directories and large images
- Xaround when you don't have ftp, or you have to cross e-mail network
- Xboundaries.
- X
- XTo configure and/or install mailsplit for your site/machine, just run the
- XConfigure script (i.e.):
- X
- X% sh Configure
- X
- XIf you're too lazy to read the man pages, here's a quick test. After
- XConfigure'ing the programs, send yourself a sample directory, for example:
- X
- X< Send yourself your bin directory: >
- X
- X% mailsplit <you> ./bin
- X
- XWatch mailsplit run. In a few minutes, you should receive mail.
- XCreate a new directory, cd to it, and run joinr on the incoming mail:
- X
- X% mkdir delete.me
- X% cd delete.me
- X% mail
- X
- X<save pieces of your bin directory in p1, p2, ...>
- X
- X% joinr p?
- X
- X* * *
- XIt is a Bourne-shell script. Read the over-blown man-page. Send me
- Xideas for improvements, bug reports.
- X-Mitch (wyle@ethz.uucp)
- X
- X*** Addendum for 2.4 ***
- XApologies to those of you who received 2.0. I fixed all the bugs which
- Xcaused it not to work (here). Please be cautious with the enclosed
- Xversion. I have tested it extensively on a Sun-3/xx under Sun OS 3.4,
- Xand a vax running Ultrix 2.0, but bugs may have crept in... The
- Xjoin-script enclosed with each first message now accepts repeats and
- Xpieces out-of-order. If you don't trust mailsplit 2.4, at least test
- Xand install this new joiner script. It really helps.
- X
- X*** Addendum for 2.5 ***
- XMore apologies to those of you who received 2.4. I am in the process
- Xof testing this package along with it's new Configure script (Thanks,
- XLarry!) on our Cray, a Unisys sys V, Ultrix, Sun OS, a convex, a
- Xsequent, an alliant, etc. When I'm confident it works on the machines
- Xhere, I'll release it to usenet. In the meantime, please beat up on it
- Xand send me bugs, ideas, etc. Configure can configure it to run on
- XUltrix, Sun OS, Dynix (sequent), convex (alliant), and vanilla sys-V
- X(Unisys 5000). If it won't run on your machine, please tell me!
- X
- XIt now understands "compact" formats, though I think one should stick
- Xto compress. There are PD implementations of compress. I noticed that
- Xsome of the machines I tested on lack uuencode/uudecode. There are PD
- Ximplementations of that as well, but after the Configure, I did NOT test
- Xmailsplit on those machines which were missing uuencode/decode.
- X
- Xcut was replaced by a sed script. I should have known cut was a Sun-ism.
- X
- X*** Addendum for 2.6 ***
- X+ joinr now explicitely exits 0; there was a bug with BSD 4.3.
- X+ The new, robust joinr script died with old awk (vers 7). I therefore
- X changed it to be less robust but more portable: pieces after # 10 will
- X NOT be checked for duplicates and/or out-of-order. I'll probably change it
- X back after everyone has new awk :-(
- X+ Added -N flag to NOT send the joinr script (now that it's grown)
- X+ Added a man page for joinr
- X+ Added a how-to pargagraph to the front of this file for impatient people :)
- X+ More support for compact/uncompact
- X+ Extensive testing on all machines at ETH campus
- END_OF_FILE
- if test 3102 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'README2.7' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README2.7'\"
- else
- echo shar: Extracting \"'README2.7'\" \(2656 characters\)
- sed "s/^X//" >'README2.7' <<'END_OF_FILE'
- X
- XFixes in version 2.7 by HIDEKI YAMANAKA:
- X
- X1. Automatic recognition of an uncomprerss program and an decoder.
- X
- X Mailsplit stores an archive like
- X
- X ...
- X begin 666 /tmp/1spxxx
- X ...
- X
- X If the file name is prefixed like /tmp/1spxxx.Z or /tmp/1spxxx.C,
- X we can simply get an appropriate uncompress program. And some people
- X prefer btoa than uuencode. the header of btoa is like
- X
- X ...
- X xbtoa5 666 /tmp/1spxxx Begin
- X ...
- X
- X So also we can get an appropriate decoder like "awk '/[bB]egin/{print $1}'".
- X If the result is "begin", then "uudecode'; if it is "xbtoa5", then "btoa -a".
- X
- X If the mechanism is included in the joinr, we can change a compress program
- X and a encoder on the command line but configuration time.
- X
- X Lastly, I think the filename "/tmp/1spxxx" is harmful because it is absolute
- X path name. If some site configures the temporal directory "/usr/tmp", the
- X site cannot reassembles transmitted files unless /tmp has enough space.
- X (Even though /usr/tmp is enough space for reassembling the pieces.)
- X I think the basename is better.
- X
- X2. Making more System V compatible.
- X
- X Joinr script isn't always compatible with other site. Commands in the script
- X are specified by its absolute pathname, but there are many System V machines
- X which are not same the path name. So I think better introduce PATH variable
- X in the script and strip dirnames of the commands.
- X
- X The "tar" program of System V produces verbose messages in the error stream
- X when specifying -v option and mailsplit is requires another error detection
- X mechanisms. The "tar" requires -o option when restoring so that the owner and
- X permission would be appropriate. (Otherwise the owner is others and the
- X permission is like that.
- X
- X System V machines doesn't always have the "compress", instead they have
- X "pack". (Pack doesn't permit to read data from the stdin, so a slight
- X change is needed.)
- X
- X System V machines doesn't have "Mail", instead they have "mailx".
- X
- X3. Abort routine when missing some parts.
- X
- X You would think errors will detect later part of the joinr. When joinr
- X passes an incorrect compressed file, uncompress sometimes produces
- X huge garbage outputs. Moreover users cannot easily know missing parts
- X if only an error detection message is shown.
- X
- X---
- XHideki Yamanaka
- X
- X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- X INTERNATIONAL INSTITUTE FOR
- X ADVANCED STUDY OF SOCIAL INFORMATION SCIENCE,
- X FUJITSU LIMITED, JAPAN
- X
- X HIDEKI YAMANAKA
- X
- XE-MAIL: yamanaka@iias.fujitsu.co.jp or
- X yamanaka%iias.fujitsu.co.jp@uunet.uu.net (in precise)
- X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- END_OF_FILE
- if test 2656 -ne `wc -c <'README2.7'`; then
- echo shar: \"'README2.7'\" unpacked with wrong size!
- fi
- # end of 'README2.7'
- fi
- if test -f 'TODO' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'TODO'\"
- else
- echo shar: Extracting \"'TODO'\" \(953 characters\)
- sed "s/^X//" >'TODO' <<'END_OF_FILE'
- X
- X 1. chmod in joinr SHOULD be 777 NOT 0777
- X
- X 2. chmod should NOT have -f flag!!
- X
- X 3. change the tar command!!!! don't check for output!
- X
- X 4. Send a GENERIC joinr without all the @^&^ pathnames!!
- X
- X 5. Use compress -d instead of uncompress
- X
- X 6. Ask where the mail program is, don't assume /usr/ucb/mail.
- X
- X 7. Configure doesn't understand relative directories! Use ~ if available,
- X cd .. (from UU when asking questions).
- X
- X 8. Add the "to-be-installed-dir" to the path, export path!
- X
- X 9. Include COMPLETE command used to send the stuff!
- X
- X10. When a directory of '.' is provided as the name to send,
- X perhaps cwd should be in subject line?
- X
- X11. Make uuencode BITNET (perhaps use btoa/atob) transparent!!!
- X***** Add support for NON-uuencode uudecode including atob btoa
- Xabe!!
- X*****
- X
- X12. Allow user to change the @&!&^# names of mailsplit and joinr!!
- X
- X13. Ad wc tests (a la cshar) and crc check counts to pieces and complete
- X tarchive.
- END_OF_FILE
- if test 953 -ne `wc -c <'TODO'`; then
- echo shar: \"'TODO'\" unpacked with wrong size!
- fi
- # end of 'TODO'
- fi
- if test -f 'joinr.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'joinr.SH'\"
- else
- echo shar: Extracting \"'joinr.SH'\" \(5704 characters\)
- sed "s/^X//" >'joinr.SH' <<'END_OF_FILE'
- Xecho "Extracting joinr (with variable substitutions)"
- X: This section of the file will have variable substitutions done on it.
- X: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
- X: Protect any dollar signs and backticks that you do not want interpreted
- X: by putting a backslash in front. You may delete these comments.
- X$spitshell >joinr <<!GROK!THIS!
- X$startsh
- X#
- X# joinr - Extract and glue together mailsplit transmissions
- X# @(#)joinr.SH 2.7 90/03/28 M F Wyle, T. Numata, H. Yamanaka
- X#
- X# \$Id: joinr.SH,v 1.9 90/03/19 22:38:39 yamanaka Rel $
- X#
- X# Modify awk script and strip dirnames of commands for compatibility
- X# between BSD and System V.
- X# 90/01/25 H.Yamanaka (with T.Numata's advices)
- X#
- X# Modify tar extraction mechanism in mailsplit to work on System V
- X# machines.
- X# 90/02/01 H.Yamanaka (with T.Numata's advices)
- X
- X############################################################################
- X# These commands and paths should be configured for your machine/site
- X
- XPATH="/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:\\
- X/usr/new:/usr/new/bin:/usr/nbin:/usr/ucb/bin:/usr/old"
- XBA=$basename # chop off leading path *
- XCAT=$cat # Concatenate And prinT *
- XTA=$tar # Archive command *
- X# options to send to archive command to extract data
- Xif test -f /vmunix ; then
- X TAO="xvf" # If BSD;
- Xelif test -f /unix ; then
- X TAO="xfo" # If System V;
- Xelse
- X TAO="xf" ; # I don't know.
- Xfi
- XRM="$rm -f" # Remove command
- XSED=$sed # Stream editor *
- XMV=$mv # Rename command *
- XAWK=$awk # get regular expression *
- XHEAD=$head # Get initial part of file (for a non-UCB sys use cat) *
- XPWD=$pwd # Print working directory *
- Xtouch=$touch # the touch command
- Xuncompress=$uncompress
- Xuudecode=$uudecode
- XUUOPT=$UUOPT
- XCE=$CE # compress'd file name extension
- X
- XTD=$TD # temp directory
- XT1=$TD/x_\$\$_ # temp file for pieces
- XT2=$TD/g_\$\$ # temp file for garbage
- XT3=$TD/f_\$\$ # temp file for archive
- XT4=$TD/p_\$\$ # file containing the extract awk script
- X
- X!GROK!THIS!
- X
- X: In the following dollars and backticks do not need the extra backslash.
- X$spitshell >>joinr <<'!NO!SUBS!'
- X##############################################################################
- X# You might want to change these, but it's not likely.
- X
- XME=`$BA $0` # This program's name
- XVE="2.7 90/03/28" # Version of this program
- X
- X##############################################################################
- X# Hacker city
- X
- Xecho " "
- Xecho "$ME version $VE (C) 1988, 1989, 1990 M F Wyle" 1>&2
- Xecho " "
- X
- Xecho "...initializing, preparing to extract..."
- Xif test ! -t 0; then
- X echo "...found data on standard in; ignoring command line..."
- Xelse
- X echo "...standard input empty, looking for files on command line..."
- X case $# in
- X 0) case $ME in
- X joinr) echo " "
- X echo "Usage: $ME [ < ] file(s)"
- X echo "Example: $ME < p1of2 p2of2"
- X echo " "
- X exit 1 ;;
- X *) $CAT $0 |/bin/sh $0
- X exit 0 ;;
- X esac ;;
- X esac
- X echo "...found $# file(s) on command line, feeding them to $ME"
- X case $ME in
- X joinr) $CAT $* | $0 ;;
- X *) $CAT $0 $* | /bin/sh $0 ;;
- X esac
- X exit 0
- Xfi
- X
- Xcase $ME in
- X sh) echo " "
- X echo "Usage: $ME file(s)"
- X echo "Example: $ME p1of2 p2of2"
- X echo " "
- X exit 1 ;;
- Xesac
- X
- X$RM $T1* $T2 $T3* $T4* # get rid of old files
- X$CAT <<'EOA' > $T4 # create awk extract script
- XAWK '
- XBEGIN { inhex = 0; nparts=0 }
- X/^---/ {
- X if ($2 == "start" && $3 == "of" && $5 == "part" && $7 == "of") {
- X nparts= $8
- X fd=proc_files[$6 - 1]
- X if (fd == 0) fd= $6
- X if (fd < 10) file = "T1" fd
- X else if (fd < 100) file = "T1" "_" fd
- X else file = "T1" "__" fd
- X if (proc_files[$6] > 0) {
- X file = "T2"
- X } else {
- X proc_files[$6] = fd
- X }
- X inhex = 1
- X getline
- X }
- X else if ($2 == "end" && $3 == "of" && $5 == "part" && $7 == "of")
- X inhex = 0
- X}
- X{ if (inhex) print $0 > file }
- XEND { nerrors=0
- X for (i=1; i <= nparts; i++)
- X if (proc_files[i] == 0) {
- X print "*** part " i " is missing. ***"
- X nerrors++
- X }
- X if (nerrors > 0) print "abort" > "T3"
- X}'
- XEOA
- X
- X# Make awk script use process-specific filenames
- X$SED -e "s;AWK;$AWK;" -e "s;T1;$T1;" -e "s;T2;$T2;" \
- X -e "s;T3;$T3;" < $T4 > $T4"p"
- X$RM $T4
- X$MV $T4"p" $T4
- X# Invoke the awk script on std in:
- Xecho ...extracting data...
- X. $T4
- Xif test -s $T3 ; then
- X echo "...aborted extraction..."
- X $RM $T1* $T2 $T3 $T4
- X exit 1
- Xfi
- X$CAT $T1* > $T3 # gather pieces
- Xecho ...finished extraction, starting uudecode...
- Xheader=`$HEAD $T3 | $AWK '/[bB]egin/{print $1 " " $3}'`
- Xset $header
- Xfname=$2
- Xcase $1 in
- X xbtoa5) uudecode=btoa
- X UUOPT='-a' ;;
- X begin) uudecode=uudecode
- X UUOPT=
- X ;;
- Xesac
- XOurDir=`$PWD`
- Xcd $TD
- X$touch $T3
- Xchmod 777 $T3
- X$uudecode $UUOPT $T3
- X$RM $T3
- Xchmod 777 $fname
- XIFS=.
- Xset $fname
- XIFS=' '
- Xcase $2 in
- X C) uncompress=uncompact
- X CE=C ;;
- X z) uncompress=unpack
- X CE=z ;;
- X Z) uncompress=uncompress
- X CE=Z ;;
- X tar) uncompress=:
- X $MV $fname $1 ;;
- X *) $MV $fname $1.$CE ;;
- Xesac
- Xfname=$1
- X
- Xecho ...finished uudecode, starting uncompress...
- X$uncompress $fname.$CE 1>/dev/null 2>&1
- X$MV $fname $OurDir
- Xcd $OurDir
- Xecho ...finished uncompress, starting tar extraction...
- X$RM $T1* # tar returns no exit status!! Grrr.
- X$TA $TAO $fname 2>$T1 # check exit status of tar
- Xif test -s $T1 ; then
- Xecho "... >>> Sigh <<< $TA seems to be having problems:"
- X$CAT $T1
- Xecho "...saving $TA archive in $fname."
- Xelse
- Xif test ! -f /vmunix ; then # for System V (by yamanaka@iias.fujitsu.co.jp)
- X $TA tfv $fname
- Xfi
- Xecho "...That's all folks!"
- X$RM $fname
- Xfi
- X$RM $T1* $T2* $T3* $T4*
- Xexit 0
- X!NO!SUBS!
- Xchmod 755 joinr
- X$eunicefix joinr
- END_OF_FILE
- if test 5704 -ne `wc -c <'joinr.SH'`; then
- echo shar: \"'joinr.SH'\" unpacked with wrong size!
- fi
- chmod +x 'joinr.SH'
- # end of 'joinr.SH'
- fi
- if test -f 'mailsplit.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mailsplit.SH'\"
- else
- echo shar: Extracting \"'mailsplit.SH'\" \(10274 characters\)
- sed "s/^X//" >'mailsplit.SH' <<'END_OF_FILE'
- Xxfile="mailsplit"
- Xecho "Extracting $xfile (with variable substitutions)"
- X: This section of the file will have variable substitutions done on it.
- X: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
- X: Protect any dollar signs and backticks that you do not want interpreted
- X: by putting a backslash in front. You may delete these comments.
- X$spitshell >$xfile <<!GROK!THIS!
- X$startsh
- X
- X##############################################################################
- X# These commands and paths should be configured for your machine/site
- X
- XPATH="/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:\\
- X/usr/new:/usr/new/bin:/usr/nbin:/usr/ucb/bin:/usr/old"
- XBASENAME=$basename
- XCAT=$cat
- XRM=$rm
- XMV=$mv
- XSPLIT=$split
- XTA=$tar # Archive command (assumed here to be in search path!)
- XCO=$compress # Default compress command (assumed to be in search path!)
- XCE=$CE # compress'd file name extension
- XMA=$Mail # Default Mail program
- XUU=$uuencode # uuencode command (assumed here to be in search path!)
- XCB=$CB # Default number of bits to use in compress
- XCF=$CF # Default compress command line flag(s)
- XMS=$MS # Mailer Subject line flag
- XDE=$DE # Default delay time between sending pieces
- XTD=$TD # Default temporary directory for storing temp files
- XDB=$DB # Default debugging level
- XSPRT="_" # Separator for archive file name
- X# ;; Added by yamanaka@iias.fujitsu.co.jp
- X##############################################################################
- X!GROK!THIS!
- X
- X: In the following dollars and backticks do not need the extra backslash.
- X$spitshell >>$xfile <<'!NO!SUBS!'
- X#
- X# mailsplit: package, transmit, re-assemble unix directories via e-mail
- X#
- X# @(#)mailsplit.SH 2.7 90/03/28 M F Wyle, H. Yamanaka
- X#
- X# $Id: mailsplit.SH,v 1.8 90/03/19 22:40:14 yamanaka Rel $
- X#
- X# Add -A option and strip dirnames of commands
- X# 90/01/25 H Yamanaka
- X
- X
- X##############################################################################
- X# You might want to change these, but it's not likely.
- X
- XME=`$BASENAME $0` # Program (my) name
- XLI=700 # Default number of lines for split-up pieces
- XCM="$0 $*" # Command line
- XVE="2.7 90/03/28" # Version of this program
- XMF="" # Default Mailer flags
- XIJ="true" # Flag which signals if joinr script should be prepended
- XTM=false # Default test Mode flag (If set, don't do anything)
- XT1=$TD/1sp$$ # Default temp file for output of tar, compress
- XT2=$TD/2sp$$ # Default temp file for uuencoded output
- XT3=$TD/3sp$$ # Default temp file prefix for split pieces
- XT4=$TD/4sp$$ # a copy of joinr
- X##############################################################################
- X
- X# You do NOT want to change these variables or their initial values!
- X
- XRA=all # Default range of pieces to send
- XFC=0 # File Count
- Xne="FL=$FL' '" # Next command in parser
- XSU="_default_" # Default Subject is first file or dir sent
- XFL="" # Initialize file list
- XTO="" # Initialize recipient
- Xumask 0 # Important for writing reading files created!
- X
- X# Human Factors Law Number 4:
- X# "Upon startup, thou shalt tell the user where he is and how to quit."
- X# -Ben Schneiderman-
- X
- Xecho " " 1>&2
- Xecho "$ME version $VE (C) 1988, 1989, 1990 M F Wyle, H. Yamanaka" 1>&2
- Xecho " " 1>&2
- X
- X##############################################################################
- X# Read beyond here at your own risk; you've entered... The hacker zone...
- X# Parse the command line for recipient, options, flags, files, dirs:
- X
- Xfor AR in $* ; do
- X case $AR in
- X -C ) ne="CO=" ;;
- X -D ) ne="TD=" ;;
- X -M ) ne="MF=" ;;
- X -N ) IJ="false" ;;
- X -A ) MS="archive" ;;
- X -T ) ne="TA=" ;;
- X -V ) DB=9 ;;
- X -b ) ne="CB=" ;;
- X -d ) ne="DE=" ;;
- X -l ) ne="LI=" ;;
- X -m ) ne="MA=" ;;
- X -n ) TM=true ;;
- X -r ) ne="RA=" ;;
- X -s ) ne="SU=" ;;
- X -t ) TM=true ;;
- X -v ) echo "$ME version $VE by Mitch Wyle" ; exit 0 ;;
- X -x* ) DB=`echo $AR | cut -c3` ; DB=${DB:-0} ;;
- X -u ) ne="UU=" ;;
- X -* ) echo " " ; echo "Bad flag for $ME": $AR
- X echo "Usage: $ME [<options>] <mailpath> <file(s)>"
- X echo "Example: $ME werner@utastro.uucp ./casetool"
- X echo " "
- X exit 0 ;;
- X * ) eval $ne"$AR" ; ne='FL=$FL" "' ;;
- X esac
- Xdone
- Xcase $# in
- X 0 | 1 )
- X echo " "
- X echo "Usage: $ME [<options>] <mailpath> <file(s)>"
- X echo "Example: $ME werner@utastro.uucp CaseTool"
- X echo " "
- X exit 0 ;;
- Xesac
- Xset $FL
- XTO=$1
- Xcase $SU in
- X _default_ ) SU=$2 ;;
- Xesac
- X
- Xcase $DB in
- X 8|9) set -x ;;
- Xesac
- X
- X# create a copy of joinr in /tmp:
- Xcat >$T4 <<'JOINR!END'
- X!NO!SUBS!
- Xcat ./joinr >>$xfile
- X$spitshell >>$xfile <<'!NO!SUBS!'
- XJOINR!END
- X
- Xcase $RA in # hacked from usenet commentary; will
- X all) ;; # be replaced by an awk script RSN
- X * )
- X SIFS="$IFS"
- X IFS=","
- X for i in $RA ; do
- X R=$R" "$i
- X done
- X RA=$R
- X IFS=$SIFS
- X R=""
- X for tok in $RA ; do
- X case $tok in
- X *-*)
- X SIFS="$IFS"
- X IFS='-'
- X set $tok
- X IFS="$SIFS"
- X i=$1
- X max=${2:-99}
- X while test $i -le $max ; do
- X R=$R" "$i
- X i=`expr $i + 1` # only exec in the entire parse
- X done ;;
- X *) R=$R" "$tok ;;
- X esac
- X RA=$R
- X done ;;
- Xesac
- X
- Xcase $DB in
- X 5|6|7|8|9) echo "...beginning tar and compress..." ;;
- Xesac
- Xset $FL ; shift
- Xfor i in $* ; do
- X if test -s $i ; then # Test existence of each file to send
- X FC=`expr $FC + 1` # Increment file counter
- X fi
- Xdone
- Xif test $FC -gt 0 ; then # Is there something to send?
- X case $DB in # Yup. continue
- X 1|2|3|4)
- X case $TM in
- X true )
- X echo "would have issued command:"
- X echo "$TA cvf $T1 $* 2> /dev/null"
- X case $CO in
- X *compress)
- X echo "CE=Z; $CO $CF $T1 1>/dev/null 2>&1 " ;;
- X *compact)
- X echo "CE=C; $CO $T1 1>/dev/null 2>&1 " ;;
- X *pack)
- X echo "CE=z; $CO $CF $T1 1>/dev/null 2>&1 " ;;
- X *cat)
- X echo "CE=tar; $MV $T1 $T1.$CE" ;;
- X *)
- X echo "$CO $T1 1>/dev/null 2>&1 " ;;
- X esac ;;
- X false) $TA cvf $T1 $* 2> /dev/null
- X case $CO in
- X *compress)
- X CE=Z; $CO $CF $T1 1>/dev/null 2>&1 ;;
- X *compact)
- X CE=C; $CO $T1 1>/dev/null 2>&1 ;;
- X *pack)
- X CE=z; $CO $T1 1>/dev/null 2>&1 ;;
- X *cat)
- X CE=tar; $MV $T1 $T1.$CE ;;
- X *)
- X $CO $T1 1>/dev/null 2>&1 ;;
- X esac ;;
- X * ) echo "Sigh... Programmer error in $ME at line 93." ;;
- X esac ;;
- X *)
- X case $TM in
- X true )
- X echo "would have issued command:"
- X echo "$TA cvf $T1 $* 2> /dev/null"
- X case $CO in
- X *compress)
- X echo "CE=Z; $CO $CF $T1 1>/dev/null 2>&1 " ;;
- X *compact)
- X echo "CE=C; $CO $T1 1>/dev/null 2>&1 " ;;
- X *pack)
- X echo "CE=z; $CO $T1 1>/dev/null 2>&1 " ;;
- X *cat)
- X echo "CE=tar; $MV $T1 $T1.$CE" ;;
- X *)
- X echo "$CO $T1 1>/dev/null 2>&1 " ;;
- X esac ;;
- X false) $TA cvf $T1 $* 2> /dev/null
- X case $CO in
- X *compress)
- X CE=Z; $CO $CF $T1 1>/dev/null 2>&1 ;;
- X *compact)
- X CE=C; $CO $T1 1>/dev/null 2>&1 ;;
- X *pack)
- X CE=z; $CO $T1 1>/dev/null 2>&1 ;;
- X *cat)
- X CE=tar; $MV $T1 $T1.$CE ;;
- X *)
- X $CO $T1 1>/dev/null 2>&1 ;;
- X esac ;;
- X * ) echo "Sigh... Programmer error in $ME at line 153." ;;
- X esac ;;
- X esac
- Xelse # Nope, nothing to send
- Xcase $DB in
- X [5-9] ) echo "...whoops! Nothing to send! Punting..." 1>&2 ;;
- Xesac
- X exit 1
- Xfi
- Xcase $DB in
- X 5|6|7|8|9) echo "...finished tar, compress, starting uuencode..."
- Xesac
- Xcase $TM in
- X true )
- X echo "would have issued command:"
- X case $UU in
- X uuencode|*uuencode)
- X echo "$UU $T1.$CE `$BASENAME $T1.$CE` > $T2 " ;;
- X *)
- X echo "(cd $TD; $UU `$BASENAME $T1.$CE` > $T2) " ;;
- X esac ;;
- X false)
- X case $UU in
- X uuencode|*uuencode)
- X $UU $T1.$CE `$BASENAME $T1.$CE` > $T2 ;;
- X *)
- X (cd $TD; $UU `$BASENAME $T1.$CE` > $T2) ;;
- X esac ;;
- X * ) echo "Sigh... Programmer error in $ME at line 170." ;;
- Xesac
- Xcase $DB in
- X 5|6|7|8|9) echo "...finished uuencode, starting split..." ;;
- Xesac
- Xcase $TM in
- X true )
- X echo "would have issued command:"
- X echo "$SPLIT -$LI $T2 $T3" ;;
- X false) $SPLIT -$LI $T2 $T3 ; ;;
- X * ) echo "Sigh... Programmer error in $ME at line 128." ;;
- Xesac
- Xcase $TM in
- X true )
- X echo "would have issued commands:"
- X case $MS in
- X archive) echo "$CAT > $TO"_n ;;
- X Subj) echo "$MA -s "$SU - part n of m" $TO" ;;
- X esac
- X echo "with n ranging from 1 to m; m cannot be determined."
- X echo "without running for real."
- X exit 0 ;;
- Xesac
- X
- Xn=1
- Xset $T3*
- Xfor f do
- X SE=false
- X case $RA in
- X all) SE=true ;;
- X * )
- X for p in $RA ; do
- X case $p in
- X $n ) SE=true ;;
- X esac
- X done ;;
- X esac
- X case $SE in
- X true)
- X {
- X echo " "
- X case $n in
- X 1)
- X if test ! -s $f ; then
- X case $DB in
- X [5-9]) echo "...whoops! $SPLIT failed! Punting..." 1>&2 ;;
- X esac
- X exit 1 ;
- X fi
- X case $IJ in
- X true) cat $T4 ;;
- X esac
- X echo " " ;;
- X esac
- X echo " "
- X echo "This file was packed by mailsplit version:"
- X echo $VE
- X echo with command:
- X echo "$CM"
- X echo "on: `date`"
- X echo " "
- X echo "--- start of $SU part $n of $#"
- X $CAT $f
- X echo "--- end of $SU part $n of $#"
- X echo " "
- X echo " "
- X } |
- X case $MS in
- X Subj) $MA $MF -s "$SU - part $n of $#" $TO ;;
- X archive) $CAT > $TO$SPRT$n ;;
- X *) $MA $MF $TO ;;
- X esac
- X case $MS in
- X archive) echo "...output into $TO$SPRT$n..." ;;
- X *) case $DB in
- X [5-9]) echo "...sent part $n of $# to $MA..."
- X echo "...sleeping $DE seconds (waiting for mailer) ..." ;;
- X esac
- X sleep $DE ;;
- X esac
- X esac
- X n=`expr $n + 1`
- X if test `expr $n % 10` -eq 0; then
- X SPRT=$SPRT"_"
- X fi
- Xdone
- X$RM -f $T1.$CE $T2 $T3* $T4
- X!NO!SUBS!
- Xchmod 755 $xfile
- X$eunicefix $xfile
- END_OF_FILE
- echo shar: 2 control characters may be missing from \"'mailsplit.SH'\"
- if test 10274 -ne `wc -c <'mailsplit.SH'`; then
- echo shar: \"'mailsplit.SH'\" unpacked with wrong size!
- fi
- chmod +x 'mailsplit.SH'
- # end of 'mailsplit.SH'
- fi
- if test -f 'undoc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'undoc'\"
- else
- echo shar: Extracting \"'undoc'\" \(6947 characters\)
- sed "s/^X//" >'undoc' <<'END_OF_FILE'
- XSince I tore the comments out of the code, and it is not customary to send
- XSCCS files around the net, I made this auxiliary file of documentation.
- X
- XAn alphabetical list of variables, their use and meaning:
- X
- XAR = argument
- XCM = command line
- XCO = compress program may be arc, etc.
- XDB = Debug level (Verbosity level)
- XDE = Delay between pieces
- XFC = file count
- XFL = File list (build up file list from params on command line in
- XFL = any order (see /usr/bin/spell) for a good example of obfuscated,
- XFL = clever parsing code
- XLI = the number of lines to split pieces into
- XMA = mail transport agent
- XME = the name of the program running
- XMF = Mail flags to send to transport
- XR = range of pieces to be re-sent during parse stage
- XRA = range of pieces to be re-sent if mailers on the way failed
- XSE = send flag; if true, send the piece. If false, don't
- XSP = the name of the split program
- XSU = subject of message (defaults to first file name)
- XT1 = temporary file containing output of tar and compress.
- XT2 = temporary file containing uuencoded stuff
- XT3 = temporary file(s) containing split pieces
- XTA = tar program (may be shar, tar, cat, etc ;-)
- XTD = Temporary directory in which temp files should go can be . or /tmp.
- XTM = Test-mode flag (-n option of make) Don't do anything, just
- XTM = echo what you would have done if testmode option not on.
- XTO = recipient(s) of message
- XUU = the uuencode program (may be replaced with btoa / atob ;-)
- XVE = version number
- Xf = file name (piece) during loop which sends pieces
- Xi = a loop index used during parse of the range of files to be re-sent
- Xmax= The loop-limit used in parse of range of files to be re-sent
- Xmax= is assumed to be 99 if no top-of-range is given.
- Xn = piece number during the loop which sends pieces via mail
- Xne = next param on command line (after flag is set, next param gets
- Xne = eval'd to the var set in ne (see above)
- Xt = a specific token containing a range to be expanded (n-m)
- Xtok= Token during parse of range of files to be re-sent
- X
- X
- XHistory:
- X# Coder Date Comments
- X#------------ -------- ---------------------------------------------------
- X# M F Wyle 02nov87 Shamelessly stolen from tarmail :-)
- X# WRU 18feb88 changed variable MAILER, added SPLITTER,
- X# LINES, USER and a warning about uudecode
- X# M F Wyle 25mar88 Add tar, extract join-script in 1st msg
- X# WRU 03apr88 fixed some quoting problems in "echo"-strings
- X# cosmetic changes: renamed "mailsplit"
- X# created THISNAME
- X# fixed some typos, added Email-addresses, example,
- X# section for suggested improvements
- X# MFW 05apr88 Fix more quoting problems in echo strings (shell
- X# variables); added /bin/rm cleanup to join-script
- X# MFW 21jun88 based on WRU's suggestions:
- X# 1) add file-name to subject
- X# 2) verbose explanations
- X# 3) add parts-order checking! Yippeee!
- X# MFW 08jul88 Fix uudecode setuid bug
- X# MFW 12jul88 Fix empty or no files bug, added FILECOUNT
- X# MFW 17jul88 Added umask 0, delay before mail, check after split
- X# MFW 19jul88 Major re-write for flags, verbose, sccs control
- X# MFW 25jul88 Added a range-parser, more flags, some documentation
- X# Up'd release to 2.0 for distribution
- X# MFW 29jul88 Fixed 8 separate bugs; upgraded join-script
- X# to accept pieces out of order and duplicate pieces.
- X# MFW 04Aug88 Fixed more bugs; added comments, put sys-specific
- X# stuff at the top for configuring. hacked join
- X# script because it leaks bugs like an ant-hill.
- X#
- X# All the comments from the net about parsing ranges
- X# won't fix the *@&$#& bugs in join.
- X# MFW 11Aug88 Fixed joinr. Added -N flag, wrote Configure script,
- X# tested on a slew of machines
- X# MFW 18Aug88 made joinr compatible with old awk, added exit
- X
- XVerbal description of algorithm:
- X====== =========== == ==========
- XWhen the program starts, it initializes some variables, then parses the
- Xentire command line. It builds up a list of non-flag options in the F
- Xvariable. The first parameter in F is the e-mail path. All others are
- Xfiles or directories.
- X
- XIf no subject is set via the "-s subject" flag, the subect is assigned
- Xfrom the first file to send. The three temporary file names (variables
- XT1, T2, and T3) are then assigned.
- X
- XThe range of pieces to be re-sent is parsed.
- X
- XDebugging output is echo'd to standard out as appropriate for the
- Xdebugging level. If the -t or -n option is set, nothing is really
- Xdone, except printing out what would have happened.
- X
- XThe tar, compress, split commands are performed, with appropriate
- Xverbosity for the debugging level. Certain checks are made along the
- Xway to verify that the commands did not fail. If one fails, the
- Xprogram exits with an appropriate failure message.
- X
- XThe files created in $T3* are sent via mail one at a time, with
- Xdelays. The first file sent has a join-script pre-pended. A file
- Xcounter $n is used to label the subject lines.
- X
- XThe temporary files are deleted.
- X
- X* * *
- X
- XThe join script which comes with each 1st message sent by mailsplit was
- Xupgraded to accept out-of-order pieces and repeated sequences of
- Xpieces. It ignores repeats, and glues the pieces together in their
- Xproper order. These features involve saving each piece in a separate
- Xfile named by it's part number, and saving it only once. awk(1) can
- Xaccomplish this task easily. An associative array is formed,
- Xcontaining all of the pieces seen by the script. If a piece comes
- Xthrough a second time, the script notices by looking in the associative
- Xarray. Duplicate pieces are piped into the file /tmp/garbage (perhaps
- XI should parameterize this name?) and later deleted. Since the first
- Xpass is now really a sort filter of the pieces, cat(1) is used to push
- Xthe sorted pieces together into uudecode.
- X
- XThe join script in 2.4 sucks rocks. I'm re-writing the @#*@ with
- Xmore error-checking, comments, configurable variables, and maybe it'll
- Xwork on somebody else's *@&$ machine! Can you say, "Test?"
- X
- XNew features in 2.5:
- X- There is a flag for turning off sending the joinr script.
- X- The joinr script is a "here" document and is spit into a temp directory
- X at startup.
- X- The package comes with a Configure script (a la Larry Wall) which will
- X configure site-specific commands, parameters and install the sucker!
- X- sccs blew up. I may move to rcs.
- X- Expect a better Configure script from metaconfig by 3.0
- X
- XNew features in 2.6:
- X+ joinr is LESS robust for compatibility with old awk. Expect machine-
- X specific joinr scripts from an intelligent Config script in 3.0
- X
- XNew features in 2.7:
- X
- X-Use a generic subject name "archive" to strip directory names in long
- X paths.
- END_OF_FILE
- if test 6947 -ne `wc -c <'undoc'`; then
- echo shar: \"'undoc'\" unpacked with wrong size!
- fi
- # end of 'undoc'
- fi
- if test -f 'joinr.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'joinr.1'\"
- else
- echo shar: Extracting \"'joinr.1'\" \(1715 characters\)
- sed "s/^X//" >'joinr.1' <<'END_OF_FILE'
- X.\" @(#)joinr.1 2.6 88/08/20 M F Wyle
- X.nr N 24
- X.nr D 5
- X.TH JOINR 1 88/08/11
- X.UC 4
- X.SH NAME
- Xjoinr \- re\-assemble mailsplit pieces into original directory tree
- X.SH SYNOPSIS
- X.B joinr
- X[ \< ]
- X.B files
- X.SH DESCRIPTION
- X.\" ---------------------------------------------------------------
- X.\" This defines appropriate quote strings for nroff and troff
- X.ds lq \&"
- X.ds rq \&"
- X.if t .ds lq ``
- X.if t .ds rq ''
- X.\" Just in case these number registers aren't set yet...
- X.if \nN==0 .nr N 10
- X.if \nD==0 .nr D 5
- X.\" ---------------------------------------------------------------
- X.I Joinr
- Xis a program to re-build files and or directories which have been sent
- Xvia mailsplit(1). It uses tar(1), uncompress(1) and awk(1) to
- Xcombine, extract, and decypher the separate pieces of mail created by
- Xmailsplit. The script accepts the pieces in
- X.I any
- Xorder and allows for duplications. That is, one can send the same pieces
- Xthrough joinr repeatedly, and send the pieces through in any order.
- X.LP
- XIt will accept files on the standard input, so a command of the form:
- X.br
- X.sp
- X\% cat lesson?of? | joinr
- X.br
- X.sp
- Xshould produce the same result as:
- X.br
- X.sp
- X\% joinr lesson?of?
- X.br
- X.sp
- XThe program is configured to run on your system by the Configure script which
- Xcomes with the mailsplit distribution. However, each mailsplit message sent
- Xalso prepends this script to the first message sent unless mailsplit is
- Xexplicitely instructed not to send joinr.
- X.SH AUTHOR
- XMitchell F. Wyle (wyle@ethz.uucp)
- X.SH BUGS
- X.LP
- XConfigure doesn't ask about defaults and options
- X.LP
- XShould bootstrap itself at the receiving site (as with configure)
- X.SH SEE ALSO
- Xsplit(1), tar(1), mail(1), uuencode(1), uudecode(1), compress(1),
- Xawk(1), sh(1)
- END_OF_FILE
- if test 1715 -ne `wc -c <'joinr.1'`; then
- echo shar: \"'joinr.1'\" unpacked with wrong size!
- fi
- # end of 'joinr.1'
- fi
- if test -f 'mailsplit.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mailsplit.1'\"
- else
- echo shar: Extracting \"'mailsplit.1'\" \(11634 characters\)
- sed "s/^X//" >'mailsplit.1' <<'END_OF_FILE'
- X.\" @(#)mailsplit.1 2.6 88/08/20 M F Wyle
- X.nr N 24
- X.nr D 5
- X.TH MAILSPLIT 1 88/08/20
- X.UC 4
- X.SH NAME
- X.B mailsplit
- X\- package, split, transmit file directories by electronic mail
- X.SH SYNOPSIS
- X.B mailsplit
- X[
- X.B options
- X]
- X.B mail-path files
- X.br
- X really:
- X.br
- X.B mailsplit
- X[
- X.B \-ANVntv
- X] [
- X.B \-C compress program
- X] [
- X.B \-D temporary directory
- X] [
- X.B \-M Mailer options
- X] [
- X.B \-T archive program
- X] [
- X.B \-b compress-bits
- X] [
- X.B \-d delay time
- X] [
- X.B \-l split lines
- X] [
- X.B \-m mail agent
- X] [
- X.B \-r parts
- X] [
- X.B \-s subject
- X] [
- X.B \-xn set debug-level n
- X] [
- X.B \-u ascii encode program
- X]
- X.I mail-path[,mailpath]
- X.I files [files] ...
- X.SH DESCRIPTION
- X.\" ---------------------------------------------------------------
- X.\" This defines appropriate quote strings for nroff and troff
- X.ds lq \&"
- X.ds rq \&"
- X.if t .ds lq ``
- X.if t .ds rq ''
- X.\" Just in case these number registers aren't set yet...
- X.if \nN==0 .nr N 10
- X.if \nD==0 .nr D 5
- X.\" ---------------------------------------------------------------
- X.I Mailsplit
- Xis a program to package, compress, document, transmit, and re-assemble
- Xmultiple files and directories to other users via electronic mail.
- XMailsplit uses tar(1), compress(1), split(1) and mail(1) to send the files,
- Xand awk(1) to re-assemble them at the receiving side. Mailsplit attempts to
- Xpreserve the integrity, structure, mode, protection, and ownership of the
- Xtransmitted directories.
- X.SH OPTIONS
- XCommand line options can be used to override the default options in the source
- Xcode of
- X.I mailsplit.
- XOptions and flags can be specified in any order on the command line.
- XThe first non-option or flag token on the command line is interpretted
- Xto be the mail path whither the data should be sent. All other
- Xnon-option or flag tokens are considered files or directories to be
- Xsent. Since the program is a shell-script, users might want to tune
- Xthe defaults for their sites. All suggestions, improvements,
- Xbug-reports, etc. would be greatly appreciated. Send them to
- Xwyle@ethz.uucp.
- X.IP -N
- Xtells mailsplit Not to send the joinr script prepended to the first
- Xmessage. The default is to prepend your version of the joinr script
- Xwith each mailsplit batch sent. Use this option to suppress sending
- Xthe joinr script. This option is useful if one is sending directories
- Xto a recipient who already has the mailsplit package installed on her
- Xsystem.
- X.IP -V
- Xsets the
- X.I verbose
- Xoption, and is equivilant to -x9 (maximum debugging). When this option is
- Xset,
- X.I mailsplit
- Xwill echo everything he does while he's doing it. This option will generate
- Xan awful lot of useless debugging information and is not recommended unless
- Xyou are debugging.
- X.IP -n
- Xputs
- X.I mailsplit
- Xinto "test" mode. This mode is analogous to make(1) -n where
- X.I mailsplit
- Xtells you which commands he would have issued without actually doing anything.
- XThis mode is also good for debugging, or when you're curious what mailsplit
- Xmight do with a complicated path or directory.
- X.IP -t
- Xsame as -n
- X.IP -v
- Xdisplays version number and exits. This option is useful only for finding out
- Xwhich version / patch level your mailsplit is.
- X.IP -A
- Xwill use the generic name "archive" for the subject instead of a long
- Xpathname.
- X.IP -C compress program
- Xtells
- X.I mailsplit
- Xto use the next argument as the program to use instead of compress(1)
- Xfor compressing the archive stream. In some circumstances, using
- Xcompress(1) may expand the size of a stream, in which case one would
- Xmight want to use cat(1) to send the archive through unchanged. The author is
- Xdubious of this option.
- X.IP -D directory
- Xinstructs
- X.I mailsplit
- Xto use
- X.I directory
- Xinstead of /tmp for temporary files created during the archival, compression,
- Xand encoding process. This option is necessary if there is very little space
- Xin /tmp, one is sending very large directories, or the file tree on this
- Xsystem is bizare.
- X.IP -M mailer options
- XWhen this option is used,
- X.I mailsplit
- Xpasses the
- X.I mailer options
- Xargument(s) to the mail program. Some mailers need options to get the job
- Xdone (we won't mention an infamous X.400 mailer). Other times, one would
- Xprefer to set options for efficiency, tell the mailer not to run
- Xinteractively, etc. To set more than one option, enclose
- X.I mailer options
- Xin quotes. Be careful about the shell's eating quotes. One might have to
- Xexperiment a bit to set all the options needed or desired.
- X.IP -T archive program
- XIf this option is set,
- X.I mailsplit
- Xuses
- X.I archive program
- Xinstead of tar(1) to archive all the files and directories. If the system
- Xdoes not have tar(1), it is unlikely that
- X.I mailsplit
- Xwill work. On the other hand, tar(1) expands binary files enormously, so one
- Xmight substitute cat(1) instead of tar(1) to reduce the size of the archive.
- X.IP -b compress-bits
- Xuses
- X.I b
- Xbits for compression. Some e-mail reachable users have bizare
- XLempel-Ziv implementations or flakey hardware which requires fewer than
- Xthe BSD default 16 bits for the common compression string code. The
- Xdefault value of this parameter is set to 12 when mailsplit is
- Xdistributed, which seems to be pretty universal. If one knows that the
- Xdata are being sent to a BSD site or a site with 16-bit compression,
- Xone should change the default in the code to 16.
- X.IP -d seconds
- Xtells
- X.I mailsplit
- Xto wait
- X.I seconds
- Xseconds after each time he invokes the mailer. Some mailers (a certain
- XX.400 system with "MTA congestion problems" will remain nameless) have
- Xproblems dealing with sudden, large bursts of messages. One might want
- Xto set the default in the code to some non-zero value if the mailer on
- Xhis system has such problems. If
- X.I mailsplit
- Xis usually used for small directories, and the default delay is small,
- Xone should use this flag to set the delay higher if a large number of files or
- Xlarge directory is sent.
- X.IP -l lines
- XThis option sets the maximum number of lines for a single mail
- Xmessage. The default as distributed is set to keep a message smaller
- Xthan 60 Kilobytes. See the discussion below. One might want to set
- Xthe default higher, and use this option to set a smaller number when
- Xsending mail through mailers which don't like large messages. (A
- Xcertain X.400 mailer...) Remember that if the archive pieces have to pass
- X.I through
- Xa mailer which wants small messages, the lines size must be set smaller.
- X.IP -m mailer
- XIf the system on which
- X.I mailsplit
- Xis running has more than one mailer (user agent) one can use this flag
- Xto choose a mailer other than the default (/usr/ucb/Mail as
- Xdistributed).
- X.IP -r parts
- XThe -r(esend) option is used to re-send pieces which became lost in the
- Xwide-area mail networks.
- X.I parts
- Xis a list of pieces to be re-sent to the recipient.
- X.I Parts
- Xcan be a comma-separated list, or numbers between dashes, or just one number
- Xand a dash, or any combination. The formal BNF of
- X.I parts
- Xis:
- X.nf
- X.br
- X
- Xparts :== <number>
- X | number,parts
- X | number-number
- X | number-
- X
- Xnumber:== <digit>
- X | <digit><number>
- X
- Xdigit :== 0|1|2|3|4|5|6|7|8|9
- X
- X.br
- X.fi
- XOnly those pieces in
- X.I parts
- Xwill be sent. This option is useful for re-transmitting part 3 of 27 instead
- Xof having to re-transmit all 27 pieces. One must be sure that the other
- Xoptions are set
- X.I exactly the same
- Xas the first transmission, including line-length, etc.
- X.IP -s subject
- Xsets the subject to
- X.I subject
- Xinstead of using the first file argument for the subject of each mail message
- Xgenerated.
- X.IP -xn
- Xsets the debugging level to n, where n is a number from 0 to 9. The higher
- Xthe number, the more debug output. Setting n to 0 causes
- X.I mailsplit
- Xto work silently. No output will be sent to standard out, and only failure
- Xmessages will be sent to standard error. Setting n to 9 is equivilant to -V
- X(verbose), and gives maximum debug output.
- X.IP u encoding program
- XThis option sets the encoding program to something other than
- Xuuencode(1c). The encoding program must be able to take 8-bit binary
- Xand produce 7-bit ASCII data.
- X.SH DISCUSSION
- X.PP
- XA few
- X.I de
- X.I facto
- Xstandards have evolved on wide-area (e-mail) networks to guarantee the safe
- Xtransmission of information:
- X.sp
- X.IP -
- XThe information must be text-only, i.e. 7-bit ASCII
- X.IP -
- XLines of text may not exceed 80 characters. A message must therefore
- Xcontain an end-of-line character at least after every 80 characters.
- X.IP -
- XA single message may not exceed 64 Kilobytes.
- X.IP -
- XLines of text starting with the word "From" will be translated
- Xto ">From."
- X.IP -
- XBlank lines at the end of a mail message are deleted.
- X.IP -
- XA message containing a period "." on a line by itself will be terminated
- Xabnormally.
- X.PP
- XUpon invocation, the program parses all flags and options, then looks
- Xfor at least two parameters on the command line: The e-mail path(s) of
- Xthe receiver(s), and the file or directory name(s) to send. If one or
- Xboth of these parameters is missing, a help message is displayed with a
- Xshort "usage" description and an example.
- X.PP
- XThe directories or files are recursively archived and compressed into a
- Xtemporary binary file. The binary file is then sent through uuencode
- Xso that it is encoded into 7-bit ASCII with end-of-lines every 79
- Xcharacters. The resulting ASCII file is then split into several
- Xdifferent files, each of which is smaller than 64 Kilobytes.
- X.PP
- XThe first file is prepended with instructions as well as the program
- Xneeded to unpackage the transmitted message or messages. All messages
- Xare pre- and post-pended with special start and end text, to assist both
- Xthe person receiving the message and the unpackaging program. Finally,
- Xeach message is sent via electronic mail to the recipient, and all
- Xtemporary files are deleted.
- X.PP
- XDuring these operations, status information is displayed after each
- Xsuccessful step. If there are no files to send, an error message is
- Xdisplayed.
- X.PP
- XAt the receiving end, a first-time user must extract the unpackaging
- Xprogram from the first e-mail message, and make the program available
- Xfor his use. A user must perform this step only once, as the packaging
- Xformat should not change. Depending on the size of the transmitted files
- Xor directories, the receiver may get one or several mail messages. The
- Xmessages contain subject headers of the form:
- X.br
- X.\" .nf
- X.sp
- X"--- start of <package> part <n> of <m>"
- X.sp
- X.br
- Xwhere <package> is the first file or directory name, <m> is the total
- Xnumber of messages into which the package was split, and <n> is in the
- Xrange 1 to m.
- X.PP
- XThe receiver must then send all of the parts through the unpackaging
- Xprogram in their proper order. This is accomplished either from within
- Xthe mail reading program, or by saving the messages into a file and
- Xinvoking the unpackaging program on the saved file. Because e-mail
- Xsystems will often deliver messages out of order, the re-assembler
- Xprogram detects and corrects when pieces are sent through it repeatedly
- Xor out of order. Only the first part number <n> is used; all others are
- Xignored.
- X.PP
- XThe re-assembler program first filters out repeated pieces and sorts
- Xthem into their correct order before it joins them together to decode,
- Xuncompress, and extract the individual files or directories.
- X.SH EXAMPLES
- X.LP
- X% mailsplit wyle@ethz.uucp /etc/hosts
- X.LP
- X% mailsplit wyle@ethz.uucp sources -r 5,7,17-21
- X.LP
- X% mailsplit -l 700 -x9 wyle@ethz.uucp goodies -s "examples"
- X.LP
- X% mailsplit -l 700 -x9 -r 19- wyle@ethz.uucp goodies
- X
- X.SH AUTHOR
- XMitchell F. Wyle (wyle@ethz.uucp)
- X.SH BUGS
- X.LP
- XBSD specific?
- X.LP
- XRe-assembler should accept pieces out of order
- X.LP
- XShould be packaged with a configurer, makefile, install script
- X.SH "SEE ALSO"
- Xsplit(1), tar(1), mail(1), uuencode(1), uudecode(1), compress(1),
- Xawk(1), sh(1)
- END_OF_FILE
- if test 11634 -ne `wc -c <'mailsplit.1'`; then
- echo shar: \"'mailsplit.1'\" unpacked with wrong size!
- fi
- # end of 'mailsplit.1'
- fi
- echo shar: End of shell archive.
- exit 0
-
-
-