SHAR(1) Wang Institute SHAR(1)NAME
shar - create file storage archive for extraction by /bin/sh
SYNOPSIS
shar [-abcsv] [-d delim] [-p prefix] files
DESCRIPTION
shar prints its input files with special command lines around them to
be used by the shell /bin/sh to extract them later. The output can be
filtered through the shell to recreate copies of the original files.
shar allows directories to be named, and shar prints the necessary
commands (mkdir & cd) to create new directories and fill them. shar
will produce commands to make executable plain files executable. shar
will not allow existing files to be over-written; such files must be
removed by the file extractor.
OPTIONS
a All the options. The options: -v-c-b-p <tab>X are
implied.
b Extract files into basenames so that files with absolute path
names are put into the current directory. This option has
strange effects when directories are archived.
c Check file size on extraction by counting characters. An
error message is reported if the sizes don't match. One
reason why the sizes may not match is that shar will append a
newline to complete incomplete last lines; shar prints a
message that mentions added newlines. Another reason why the
sizes may not match is that some network mail programs remove
non-whitespace control characters. On extraction, shar
prints a message that mentions control characters.
s Silent running. All checking and extra output is inhibited.
v Print verbose feedback messages about what shar is doing.
Sizes of plain files are echoed to allow a simple validity
check.
d delim Use this as the ``end of file'' delimiter instead of the
default. The only reason to change it is if you suspect an
file contains the default delimiter: SHAR_EOF.
p prefix Use this as the prefix to each line of the archived files.
This is to make sure that special characters at the start of
lines are not eaten up by programs like mailers. If this
option is used, the files will be extracted with the stream
editor sed rather than cat so it is more efficient and
portable to avoid setting the prefix, though perhaps less
safe if you don't know what is in the files.
SEE ALSOtar(1), tp(1), sh(1)AUTHOR
Gary Perlman (based on a shell version by James Gosling, with additions
motivated by Derek Zahn, Michael Thompson, H. Morrow Long, Fred Avolio,
Gran Uddeborg, & Chuck Wegrzyn).
LIMITATIONS
shar does not know anything about links between files or binary files.
UNIX User's Manual June 3, 1985 SHAR(1)