Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ shar(1) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought



SHAR(1)                          UNIX System V                          SHAR(1)


NAME
      shar - create shell archives

SYNOPSIS
      shar [ options ] files

DESCRIPTION
      shar creates "shell archives" (or shar files) which are in text format
      and can be mailed. These files may be unpacked later by executing them
      with /bin/sh.

   Options
         -v     verbose. This option causes a running commentary as the archive
                is created, and another as it is unpacked. This option does not
                control the error messages, only the informational messages.

         -s     sum. The files are tested with the sum command for damage in
                transit. Errors are reported.

         -x     don't overwrite existing files. The unpack will check for an
                existing file before unpacking a given file from the archive.

         -b     binary. This option causes all files to be treated as binary
                files, and the files are changed to text using uuencode.
                Commands are embedded in the output files to change use
                uudecode and recreate the binary files.

         -M     mixed text and binary.  This option causes each file to be
                examined to determine if it is text or data.  Binary files will
                be processed using uuencode.

         -D     give detail of archive. The date, user, and working directory
                are added to the archive as comments.

         -c     produce cut line. This option causes a line saying "cut here"
                to be placed at the start of each output file. This is for
                sites not offering the unshar command or shell script.

         -f     filename only. By default the entire path name is used as given
                on the command line. This option causes only the file names to
                be used, which is useful when building a shar from several
                directories, or another directory.

         -dXXX  change delimiter to XXX. The default delimiter is SHAR_EOF,
                placed at the end of each file. This option is left for
                historical reasons, to amuse those who want their shar files to
                be personalized.

         -ofile output filename. The file file is used for output instead of
                the standard output. This option is required to use the -l
                (limit filesize) option.



10/89                                                                    Page 1







SHAR(1)                          UNIX System V                          SHAR(1)


         -lnum  file size limit. The output files created by shar will be
                smaller than numk in length. The -o option must be used to
                specify an output filename, and the digits 00 through 99 will
                be appended to form a series of output filenames. Informative
                messages and sequence checking are included.

      EXAMPLES



        shar *.c > cprog.shar        # all C prog sources
        shar -v *.[ch] > cprog.shar  # verbose, .c and .h files
        shar -b -l28 -oarc.sh *.arc  # all binary .arc files, into
                                     # files arc.sh01 -- arc.shNN
        shar -f /lcl/src/u*.c > u.sh # use only the filenames

WARNINGS
      Use of the -s, -b, and -M options will slow the archive process
      considerably, depending on the number of files.

FILES
      Temp files ._temp_ and ._seq_ are created and delted as needed.

SEE ALSO
      unshar or unshar.sh.

DIAGNOSTICS
      Error messages for missing or unaccessable files.

LIMITATIONS
      Does not chase directory names, limited to the number of names on a
      command line. Uses the file command to determine file type, may be
      affected by its limitations. The -D option calls the date, who am i, and
      pwd commands, and will produce garbage if they are not present.

      Requires the uudecode program to unpack binary files. On some systems,
      such as Sun, this program requires world write on the current directory.

      The first file archived may not have a name starting with a hyphen, and
      if the file type is being set manually (-p) no file may be named -t or
      -b. Option parsing should be done with getopt.

AUTHOR
      Bill Davidsen, (davidsen@sixhub.uucp).

COPYRIGHT
      Copyright 1988 by Bill Davidsen. This program and documentation may be
      used by any person for any purpose.






Page 2                                                                    10/89





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026