unshar - phpMan

Command: man perldoc info search(apropos)  

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

* 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 debug::                  debug option (-D)
* 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.

unshar (GNU sharutils) - unpack a shar archive
Usage:  unshar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]

   -d, --directory=DIR        unpack into the directory DIR
   -c, --overwrite            overwrite any pre-existing files
   -f, --force                an alias for the 'overwrite' option
   -E, --split-at=SPLIT-PAT   split input on SPLIT-PAT lines
   -e, --exit-0               split input on "exit 0" lines
                                - prohibits the option 'split-at'
   -D, --debug                debug the shell code
   -v, --version[=MODE]       output version information and exit
   -h, --help                 display extended usage information and exit
   -!, --more-help            extended usage information passed thru pager
   -R, --save-opts[=FILE]     save the option state to the config file FILE
   -r, --load-opts=FILE       load options from the config file FILE
                                - disabled as '--no-load-opts'
                                - may appear multiple times

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.

If no arguments are provided, input arguments are read from stdin,
one per line; blank and '#'-prefixed lines are comments.
'stdin' may not be a terminal (tty).

The following option preset mechanisms are supported:
 - reading file $HOME/.sharrc

'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.

Please send bug reports 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 "unpack into the directory `dir'" option.  This option
takes a string argument `dir'.  The input file names are relative to
the current directory when the program was started.  This option tells
`unshar' to insert a `cd <dir>' commad at the start of the `shar' text
written to the shell.

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 "split input on SPLIT-MARK lines" option.  This option
takes a string argument `split-mark'.  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 at the start
of the last line.

   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 debug,  Prev: unshar split-at,  Up: unshar Invocation

2.2.6 exit-0 option (-e)

This is the "split input on "exit 0" lines" option.

This option has some usage constraints.  It:
   * must not appear in combination with any of the following options:

   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 debug,  Next: unshar config,  Prev: unshar exit-0,  Up: unshar Invocation

2.2.7 debug option (-D)

This is the "debug the shell code" option.  "set -x" will be emitted
into the code the shell interprets.

File: sharutils.info,  Node: unshar config,  Next: unshar exit status,  Prev: unshar debug,  Up: unshar Invocation

2.2.8 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

   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:
   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:
   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

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:

     Only print the version.

     Name the copyright usage licensing terms.  This is the default.

     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.9 unshar exit status

One of the following exit values will be returned:
     Successful program execution.

     There was an error in command usage.

     cannot spawn or write to a shell process

     cannot create output file

     the working directory structure is invalid

     memory allocation failure

     invalid input, does not contain a shar file

     A specified configuration file could not be loaded.

     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.10 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.11 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.12 unshar See Also


Generated by $Id: phpMan.php,v 4.55 2007/09/05 04:42:51 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2020-05-27 21:44 @ CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0!Valid CSS!