SHAR(1) UNIX Programmer's Manual SHAR(1)
shar - create a shell archive of files
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
s
\bsh
\bha
\bar
\br f
\bfi
\bil
\ble
\be .
\b..
\b..
\b.
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bS_
\bh_
\ba_
\br writes an _
\bs_
\bh(1) shell script to the standard output
which will recreate the file hierarchy specified by the com-
mand line operands. Directories will be recreated and must
be specified before the files they contain.
_
\bS_
\bh_
\ba_
\br is normally used for distributing small numbers of
files by _
\bf_
\bt_
\bp(1) or _
\bm_
\ba_
\bi_
\bl(1).
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
compress(1), mail(1), uuencode(1), tar(1)
_
\bS_
\bh_
\ba_
\br makes no provisions for special types of files or files
containing magic characters.
It is easy to insert trojan horses into _
\bs_
\bh_
\ba_
\br files. It is
strongly recommended that all shell archive files be exam-
ined before running them through _
\bs_
\bh(1). Archives produced
using this implementation of _
\bs_
\bh_
\ba_
\br may be easily examined
grep -v '^X' program.shar
E
\bEX
\bXA
\bAM
\bMP
\bPL
\bLE
\bES
\bS
To create a shell archive of the program _
\bl_
\bs(1) and mail it
shar `find . -print` | mail -s "ls source" rick
To recreate the program directory:
<delete header lines and examine mailed archive>