splitting uuencode output

Bill Irwin bill at twg.bc.ca
Sun Mar 31 09:39:40 AEST 1991


kmcvay at oneb.wimsey.bc.ca (Ken McVay) writes:

} I want to uuencode and transmit a large file ( >1024k ), but don't want
} to send one massive chunk.

} The syntax is 'uuencode infile outfile destfile' but results in one
} massive file. I assume I can split it and mail the individual split
} parts, but that might create a problem if they end up with the wrong
} part numbers through an error here - is there an automatic way to
} split the output into (for instance) 100k files with uuencode?

Sounds like you're a candidate for SHAR.  This program splits &
numbers the parts, as well as slicing & dicing and anything else
you want.  8^)

Here is a portion of the README.  If you would like it, send me
mail and I will mail it to you.

------------------------ shar  usage -----------------------------------
shar 3.30
usage: shar [ options ] file [ file1 ... ] ]
-V  produce "vanilla" shars demanding little of the unshar environment
-v  verbose messages OFF while executing
-w  don't check with 'wc -c' after unpack
-n  Name of archive (documentation)
-a  Generate Submitted-by: & Archive-name: headers
-s  override automatically determined submitter name
-x  don't overwrite existing files
-X  interactively overwrite existing files (NOT FOR NET SHARS)
-b  treat all files as binary, use uuencode
-t  treat all files as text (default)
-C  compress and uuencode all files
-p  allow positional parameter options. The options "-b" and "-t"
    and "-C" may be embedded, and files to the right of the
    option will be processed in the specified mode
-M  mixed mode. Determine if the files are text or
    binary and archive correctly.
-P  use temp files instead of pipes in the shar file
-c  start the shar with a cut line
-f  restore by filename only, rather than path
-dXXX   use XXX to delimit the files in the shar
-oXXX   (or -o XXX) output to file XXX.01 thru XXX.nn
-lXX    limit output file size to XXk bytes (but don't split files)
-LXX    limit output file size to XXk bytes (may split files)
-S      read files to wrap from stdin, ignoring argument line

The -S option reads filenames one per line from stdin; input
format must be similar to 'find' output, except that if -p
is specified, -b, -t or -C may be used (on lines by themselves)
e.g., find . -type f -print | sort | shar -C -L50 -o /tmp/big

The 'o' option is required if the 'l' or 'L' option is used
The 'n' option is required if the 'a' option is used
The 'x' and 'L' options are incompatible

-a generates sharname/part## headers. If the -a argument contains
a '/', then /patch is not appended
The automatic submitter name is trivial: essentially `whoami`@`uname`

------------------------ unshar usage -----------------------------------
Unshar has no usage built in.  It has default actions when invoked
with no arguments (read from stdin).

Usage:     unshar [-c] [-C exit_line] [ -d directory ] [ file ] ...

     The -d flag tells unshar to change directory before unsharing

     It can unshar shar files concatenated in one file, with the
     the "-c" command, which separates files by recognizing the
     "exit 0" string at the beginning of a line

     (The -C string option allows you to specify this string, thus
     -c is equivalent to -C "exit 0")
-- 
Bill Irwin    -       The Westrheim Group     -    Vancouver, BC, Canada
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uunet!van-bc!twg!bill     (604) 431-9600 (voice) |     Your Computer  
bill at twg.bc.ca            (604) 430-4329 (fax)   |    Systems Partner



More information about the Comp.unix.questions mailing list