unshar - phpMan

File: sharutils.info,  Node: unshar Invocation,  Next: uuencode Invocation,  Prev: shar Invocation,  Up: Basic
2.2 Invoking unshar
===================
Unshar scans the input files (typically email messages) looking for the
start of a shell archive.  If no files are given, then standard input
is processed instead.  It then passes each archive discovered through
an invocation of the shell program to unpack it.
   This section was generated by *AutoGen*, using the `agtexi-cmd'
template and the option descriptions for the `unshar' program.  This
software is released under the GNU General Public License, version 3 or
later.
* Menu:
* unshar usage::                  unshar help/usage (`--help')
* unshar directory::              directory option (-d)
* unshar overwrite::              overwrite option (-c)
* unshar force::                  force option (-f)
* unshar split-at::               split-at option (-E)
* unshar exit-0::                 exit-0 option (-e)
* unshar config::                 presetting/configuring unshar
* unshar exit status::            exit status
* unshar Authors::                Authors
* unshar Bugs::                   Bugs
* unshar See Also::               See Also
File: sharutils.info,  Node: unshar usage,  Next: unshar directory,  Up: unshar Invocation
2.2.1 unshar help/usage (`--help')
----------------------------------
This is the automatically generated usage text for unshar.
   The text printed is the same whether selected with the `help' option
(`--help') or the `more-help' option (`--more-help').  `more-help' will
print the usage text by passing it through a pager program.
`more-help' is disabled on platforms without a working `fork(2)'
function.  The `PAGER' environment variable is used to select the
program, defaulting to `more'.  Both will exit with a status code of 0.
Usage: /u/ROOT/usr/local/bin/unshar [OPTION]... [FILE]...
Mandatory arguments to long options are mandatory for short options too.
  -d, --directory=DIRECTORY   change to DIRECTORY before unpacking
  -c, --overwrite             pass -c to shar script for overwriting files
  -e, --exit-0                same as `--split-at="exit 0"'
  -E, --split-at=STRING       split concatenated shars after STRING
  -f, --force                 same as `-c'
      --help                  display this help and exit
      --version               output version information and exit
If no FILE, standard input is read.
Report bugs to <bug-gnu-utils AT gnu.org>.
File: sharutils.info,  Node: unshar directory,  Next: unshar overwrite,  Prev: unshar usage,  Up: unshar Invocation
2.2.2 directory option (-d)
---------------------------
This is the "change directory to `dir' first" option.  This option
takes an argument string `dir'.  Before unpacking any files, change the
current directory to `dir'.
File: sharutils.info,  Node: unshar overwrite,  Next: unshar force,  Prev: unshar directory,  Up: unshar Invocation
2.2.3 overwrite option (-c)
---------------------------
This is the "overwrite any pre-existing files" option.  This option is
passed through as an option to the shar file.  Many shell archive
scripts accept a `-c' argument to indicate that existing files should
be overwritten.
File: sharutils.info,  Node: unshar force,  Next: unshar split-at,  Prev: unshar overwrite,  Up: unshar Invocation
2.2.4 force option (-f)
-----------------------
This is an alias for the overwrite option, *note the overwrite option
documentation: unshar overwrite.
File: sharutils.info,  Node: unshar split-at,  Next: unshar exit-0,  Prev: unshar force,  Up: unshar Invocation
2.2.5 split-at option (-E)
--------------------------
This is the "separate archives on SPLIT-PAT lines" option.  This option
takes an argument string `split-pat'.  With this option, `unshar'
isolates each different shell archive from the others which have been
placed in the same file, unpacking each in turn, from the beginning of
the file to the end.  Its proper operation relies on the fact that many
shar files are terminated by a readily identifiable string.
   For example, noticing that most `.signatures' have a double hyphen
("-") on a line right before them, one can then sometimes use
`--split-at=--'.  The signature will then be skipped, along with the
headers of the following message.
File: sharutils.info,  Node: unshar exit-0,  Next: unshar config,  Prev: unshar split-at,  Up: unshar Invocation
2.2.6 exit-0 option (-e)
------------------------
This is the "split archives at "exit 0" lines" option.
This option has some usage constraints.  It:
   * must not appear in combination with any of the following options:
     split-at.
   Most shell archives end with a line consisting of simply "exit 0".
This option is equivalent to (and conflicts with) `--split-at="exit 0"'.
File: sharutils.info,  Node: unshar config,  Next: unshar exit status,  Prev: unshar exit-0,  Up: unshar Invocation
2.2.7 presetting/configuring unshar
-----------------------------------
Any option that is not marked as not presettable may be preset by
loading values from configuration ("rc" or "ini") files.
`libopts' will search in `$HOME' for configuration (option) data.  The
environment variable `HOME, ' is expanded and replaced when the program
runs If this is a plain file, it is simply processed.  If it is a
directory, then a file named `.sharrc' is searched for within that
directory.
   Configuration files may be in a wide variety of formats.  The basic
format is an option name followed by a value (argument) on the same
line.  Values may be separated from the option name with a colon, equal
sign or simply white space.  Values may be continued across multiple
lines by escaping the newline with a backslash.
   Multiple programs may also share the same initialization file.
Common options are collected at the top, followed by program specific
segments.  The segments are separated by lines like:
    [UNSHAR]
   or by
    <?program unshar>
   Do not mix these styles within one configuration file.
   Compound values and carefully constructed string values may also be
specified using XML syntax:
    <option-name>
       <sub-opt>...&lt;...&gt;...</sub-opt>
    </option-name>
   yielding an `option-name.sub-opt' string value of
    "...<...>..."
   `AutoOpts' does not track suboptions.  You simply note that it is a
hierarchicly valued option.  `AutoOpts' does provide a means for
searching the associated name/value pair list (see: optionFindValue).
   The command line options relating to configuration and/or usage help
are:
version (-v)
............
Print the program version to standard out, optionally with licensing
information, then exit 0.  The optional argument specifies how much
licensing detail to provide.  The default is to print the license name
with the version.  The licensing infomation may be selected with an
option argument.  Only the first letter of the argument is examined:
`version'
     Only print the version.
`copyright'
     Name the copyright usage licensing terms.  This is the default.
`verbose'
     Print the full copyright usage licensing terms.
File: sharutils.info,  Node: unshar exit status,  Next: unshar Authors,  Prev: unshar config,  Up: unshar Invocation
2.2.8 unshar exit status
------------------------
One of the following exit values will be returned:
`0 (EXIT_SUCCESS)'
     Successful program execution.
`1 (EXIT_FAILURE)'
     The operation failed or the command syntax was not valid.
`66 (EX_NOINPUT)'
     A specified configuration file could not be loaded.
`70 (EX_SOFTWARE)'
     libopts had an internal operational error.  Please report it to
     autogen-users AT lists.net.  Thank you.
File: sharutils.info,  Node: unshar Authors,  Next: unshar Bugs,  Prev: unshar exit status,  Up: unshar Invocation
2.2.9 unshar Authors
--------------------
The `shar' and `unshar' programs is the collective work of many
authors.  Many people contributed by reporting problems, suggesting
various improvements or submitting actual code.  A list of these people
is in the `THANKS' file in the sharutils distribution.
File: sharutils.info,  Node: unshar Bugs,  Next: unshar See Also,  Prev: unshar Authors,  Up: unshar Invocation
2.2.10 unshar Bugs
------------------
Please put `sharutils' in the subject line for emailed bug reports.  It
helps to spot the message.
File: sharutils.info,  Node: unshar See Also,  Prev: unshar Bugs,  Up: unshar Invocation
2.2.11 unshar See Also
----------------------
shar(1)