home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / shar349.zip / shar.man < prev    next >
Text File  |  1993-05-15  |  11KB  |  265 lines

  1.  
  2.  
  3.  
  4. SHAR(1)                                                   SHAR(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        shar - create shell archives
  9.  
  10. SSYYNNOOPPSSIISS
  11.        shar [ options ] file ...
  12.        shar -S [ options ]
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.        Shar creates "shell archives" (or shar files) which are in
  16.        text format and can be mailed. These files may be unpacked
  17.        later  by  executing  them  with  /bin/sh.  The  resulting
  18.        archive is sent to standard out unless the  _-_o  option  is
  19.        given.   A wide range of features provide extensive flexi-
  20.        bility in  manufacturing  shars  and  in  specifying  shar
  21.        "smartness."   Archives may be "vanilla" or comprehensive.
  22.        This manual page reflects shar version 3.49.
  23.  
  24.    OOPPTTIIOONNSS
  25.        Options can be given in any order. Some options depend  on
  26.        each other:
  27.             The _-_o option is required if the _-_l or _-_L option is used.
  28.             The _-_n option is required if the _-_a option is used.
  29.             See _-_V below.
  30.  
  31.        _-_V     Produce  "vanilla"  shars  which rely only upon the
  32.               existence of sed and echo in the unsharing environ-
  33.               ment.   In  addition,  "if  test" must also be sup-
  34.               ported if the _-_X option is used.  The  _-_V  silently
  35.               disables options offensive to the "network cop" (or
  36.               "brown shirt"), but does warn you if it  is  speci-
  37.               fied  with  _-_B,  _-_C, _-_p or _-_M (any of which does or
  38.               might require uudecode or compress in the unsharing
  39.               environment).
  40.  
  41.        _-_v     Verbose  OFF. Disables the inclusion of comments to
  42.               be output when the archive is unpacked.
  43.  
  44.        _-_w     Do NOT check with 'wc -c' after unpack. The default
  45.               is to check.
  46.  
  47.        _-_n name
  48.               Name of archive to be included in the header of the
  49.               shar files.  See the _-_a switch.
  50.  
  51.        _-_a     Allows automatic generation of headers:
  52.                    Submitted-by: who@where
  53.                    Archive-name: <name>/part##
  54.               The <name> must be given with the  _-_n  switch.   If
  55.               name includes a '/' "/part" isn't used. Thus:
  56.                  -n xyzzy                      produces:
  57.                                                xyzzy/part01
  58.                                                xyzzy/part02
  59.  
  60.                  -n xyzzy/patch                produces:
  61.  
  62.  
  63.  
  64.                          August 12, 1990                        1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SHAR(1)                                                   SHAR(1)
  71.  
  72.  
  73.                                                xyzzy/patch01
  74.                                                xyzzy/patch02
  75.  
  76.                  -n xyzzy/patch01.             produces:
  77.                                                xyzzy/patch01.01
  78.                                                xyzzy/patch01.02
  79.  
  80.               The  who@where can be explicitly stated with the _-_s
  81.               switch if the default isn't apropriate.   Who@where
  82.               is essentially built as `whoami`@`uname`.
  83.  
  84.        _-_s who@where
  85.               Override automatically determined submitter name.
  86.  
  87.        _-_x     Overwrite existing files without checking.  If nei-
  88.               ther _-_x nor _-_X is specified, the unpack will  check
  89.               for and not overwrite existing files when unpacking
  90.               the archive (unless '-c' is passed as  a  parameter
  91.               to the script when unpacking).
  92.  
  93.        _-_X     Interactively  overwrite existing files (DO NOT USE
  94.               FOR SHARS SUBMITTED TO THE NET).
  95.  
  96.        _-_B     Treat all files as binary, use  uuencode  prior  to
  97.               packing.  This  increases  the size of the archive.
  98.               The  recipient  must  have  uudecode  in  order  to
  99.               unpack.   (USE  OF  UUENCODE  IS NOT APPRECIATED BY
  100.               MANY ON THE NET).
  101.  
  102.        _-_T     Treat all files as text (default).
  103.  
  104.        _-_C     Compress and uuencode all files prior  to  packing.
  105.               The  recipient must have uudecode and uncompress in
  106.               order to unpack (USE OF UUENCODE  AND  COMPRESS  IS
  107.               NOT APPRECIATED BY MANY ON THE NET).
  108.  
  109.        _-_m     Generate 'touch' commands to restore the file modi-
  110.               fication  dates  when  unpacking  files  from   the
  111.               archive.
  112.  
  113.        _-_p     Allow  positional  parameter  options.  The options
  114.               "_-_B" and "_-_T" and "_-_C" may be embedded,  and  files
  115.               to the right of the option will be processed in the
  116.               specified mode.
  117.  
  118.        _-_b X   When doing compression, use '-bX' as a parameter to
  119.               compress.  The _-_B options turns on the _-_C option by
  120.               default.
  121.  
  122.        _-_M     Mixed mode. Determine if  the  files  are  text  or
  123.               binary  and  archive  correctly.  Files found to be
  124.               binary are uudecoded prior to packing (USE OF UUEN-
  125.               CODE IS NOT APPRECIATED BY MANY ON THE NET).
  126.  
  127.  
  128.  
  129.  
  130.                          August 12, 1990                        2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SHAR(1)                                                   SHAR(1)
  137.  
  138.  
  139.        _-_P     Use  temporary  files  instead of pipes in the shar
  140.               file.
  141.  
  142.        _-_c     Start the shar with a cut line. A line saying  'Cut
  143.               here' is placed at the start of each output file.
  144.  
  145.        _-_f     Restore  by  filename  only, rather than path. This
  146.               option causes only file names to be used, which  is
  147.               useful  when  building a shar from several directo-
  148.               ries, or another directory.  Note that if a  direc-
  149.               tory  name  is  passed to shar, the substructure of
  150.               that directory will be restored whether _-_f is spec-
  151.               ified or not.
  152.  
  153.        _-_d XXX Use XXX to delimit the files in the shar instead of
  154.               SHAR_EOF.  This is for those who want to  personal-
  155.               ize their shar files.
  156.  
  157.        _-_F     Forces  the  prefix  character (normally 'X' unless
  158.               the parameter to the _-_d option starts with 'X')  to
  159.               be  prepended  to  every line even if not required.
  160.               This option may slightly increase the size  of  the
  161.               archive, especially if _-_B or _-_C is used.
  162.  
  163.        _-_o XXX Save  the  archive  to  files  XXX.01  thru  XXX.nn
  164.               instead of standard out.  Must be used when the  _-_l
  165.               or the _-_L switches are used
  166.  
  167.        _-_l XX  Limit  the  output file size to XXk bytes but don't
  168.               split input files.
  169.  
  170.        _-_L XX  Limit output file size to XXk bytes and split files
  171.               if necessary. The archives created with this option
  172.               must be unpacked in correct order.
  173.  
  174.        _-_S     Read list of files to be packed from  the  standard
  175.               input  rather  than  from  the command line.  Input
  176.               must be in a form similar to that generated by  the
  177.               find  command,  one filename per line.  This switch
  178.               is especially useful when the command line will not
  179.               hold the list of files to be packed. For example:
  180.  
  181.               find . -type f -print | sort | shar -S -C -L50 -o /tmp/big
  182.  
  183.               If  _-_p  is  specified on the command line, then the
  184.               options "_-_B" and "_-_T" and "_-_C" may be  included  in
  185.               the  standard  input (on a line separate from file-
  186.               names).  The maximum number of  lines  of  standard
  187.               input, file names and options, may not exceed 1024.
  188.  
  189. EEXXAAMMPPLLEESS
  190.        shar *.c > cprog.shar                # all C prog sources
  191.        shar -v *.[ch] > cprog.shar          # non-verbose, .c and .h files
  192.        shar -B -l28 -oarc.sh *.arc          # all binary .arc files, into
  193.  
  194.  
  195.  
  196.                          August 12, 1990                        3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SHAR(1)                                                   SHAR(1)
  203.  
  204.  
  205.                                             # files arc.sh.01 thru arc.sh.NN
  206.        shar -f /lcl/src/u*.c > u.sh         # use only the filenames
  207.  
  208. WWAARRNNIINNGGSS
  209.        No chmod or touch is ever generated for  directories  cre-
  210.        ated  when  unpacking.   Thus,  if a directory is given to
  211.        shar, the protection and modification dates of correspond-
  212.        ing  unpacked  directory may not match those of the origi-
  213.        nal.
  214.  
  215.        If a directory is passed to shar, it may be  scanned  more
  216.        than  once.   Therefore,  one should be careful not change
  217.        the directory while shar is running.
  218.  
  219.        Be careful that the output file(s) are not included in the
  220.        inputs  or shar may loop until the disk fills up.  Be par-
  221.        ticularly careful when a directory is passed to shar  that
  222.        the output files are not in that directory (or a subdirec-
  223.        tory of that directory).
  224.  
  225.        Use of the _-_B, _-_M or _-_C may slow the archive process  con-
  226.        siderably, depending on the number of files.
  227.  
  228.        Use  of  _-_X  produces shars which _W_I_L_L cause problems with
  229.        many  unshar  procedures.   Use  this  feature  only   for
  230.        archives to be passed among agreeable parties.  Certainly,
  231.        _-_X is NOT for shell archives which are to be submitted  to
  232.        Usenet.   Usage of _-_B or _-_C in net shars will cause you to
  233.        be flamed off the earth.  Using _-_m or  not  using  _-_F  may
  234.        also get you occasional complaints.
  235.  
  236. SSEEEE AALLSSOO
  237.        unshar(1)
  238.  
  239. DDIIAAGGNNOOSSTTIICCSS
  240.        Error  messages  for  illegal or incompatible options, for
  241.        non-regular,  missing  or  inaccessible   files   or   for
  242.        (unlikely) memory allocation failure.
  243.  
  244. AAUUTTHHOORRSS
  245.        shar3 is a derived work based on the efforts of:
  246.        decvax!microsof!uw-beave!jim (James Gosling at CMU)
  247.        Michael A. Thompson, Dalhousie University, Halifax, N.S., Canada
  248.        davidsen@sixhub (Bill Davidsen)
  249.        rhg@CPS.COM (Richard H. Gumpertz)
  250.        colas@avahi.inria.fr (Colas Nahaboo)
  251.        bill@netagw.com (Bill Aten)
  252.        dennis%nanovx@gatech.edu (Dennis Boylan)
  253.        wht%n4hgf@gatech.edu (Warren Tucker)
  254.        (other anonymous persons)
  255.  
  256.        man pages:
  257.        jhd@irfu.se (Jan Dj{rv)
  258.  
  259.  
  260.  
  261.  
  262.                          August 12, 1990                        4
  263.  
  264.  
  265.