{
    "mode": "info",
    "parameter": "unshar",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/unshar/json",
    "generated": "2026-11-15T16:44:00Z",
    "sections": {
        "File: sharutils.info,  Node: unshar Invocation,  Next: uuencode Invocation,  Prev: shar Invocation,  Up: Basic": {
            "content": "",
            "subsections": [
                {
                    "name": "2.2 Invoking unshar",
                    "content": ""
                }
            ]
        },
        "Unshar scans the input files (typically email messages) looking for the": {
            "content": "start of a shell archive.  If no files are given, then standard input\nis processed instead.  It then passes each archive discovered through\nan invocation of the shell program to unpack it.\n\nThis section was generated by *AutoGen*, using the `agtexi-cmd'\ntemplate and the option descriptions for the `unshar' program.  This\nsoftware is released under the GNU General Public License, version 3 or\nlater.\n\n* Menu:\n\n* unshar usage::                  unshar help/usage (`--help')\n* unshar directory::              directory option (-d)\n* unshar overwrite::              overwrite option (-c)\n* unshar force::                  force option (-f)\n* unshar split-at::               split-at option (-E)\n* unshar exit-0::                 exit-0 option (-e)\n* unshar debug::                  debug option (-D)\n* unshar config::                 presetting/configuring unshar\n* unshar exit status::            exit status\n* unshar Authors::                Authors\n* unshar Bugs::                   Bugs\n* unshar See Also::               See Also\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar usage,  Next: unshar directory,  Up: unshar Invocation": {
            "content": "This is the automatically generated usage text for unshar.\n\nThe text printed is the same whether selected with the `help' option\n(`--help') or the `more-help' option (`--more-help').  `more-help' will\nprint the usage text by passing it through a pager program.\n`more-help' is disabled on platforms without a working `fork(2)'\nfunction.  The `PAGER' environment variable is used to select the\nprogram, defaulting to `more'.  Both will exit with a status code of 0.\n\nunshar (GNU sharutils) - unpack a shar archive\nUsage:  unshar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\n-d, --directory=DIR        unpack into the directory DIR\n-c, --overwrite            overwrite any pre-existing files\n-f, --force                an alias for the 'overwrite' option\n-E, --split-at=SPLIT-PAT   split input on SPLIT-PAT lines\n-e, --exit-0               split input on \"exit 0\" lines\n- prohibits the option 'split-at'\n-D, --debug                debug the shell code\n-v, --version[=MODE]       output version information and exit\n-h, --help                 display extended usage information and exit\n-!, --more-help            extended usage information passed thru pager\n-R, --save-opts[=FILE]     save the option state to the config file FILE\n-r, --load-opts=FILE       load options from the config file FILE\n- disabled as '--no-load-opts'\n- may appear multiple times\n",
            "subsections": []
        },
        "Options are specified by doubled hyphens and their name or by a single": {
            "content": "hyphen and the flag character.\n",
            "subsections": []
        },
        "If no arguments are provided, input arguments are read from stdin,": {
            "content": "one per line; blank and '#'-prefixed lines are comments.\n'stdin' may not be a terminal (tty).\n\nThe following option preset mechanisms are supported:\n- reading file $HOME/.sharrc\n\n'unshar' scans the input files (typically email messages) looking for the\nstart of a shell archive.  If no files are given, then standard input is\nprocessed instead.  It then passes each archive discovered through an\ninvocation of the shell program to unpack it.\n\nPlease send bug reports to:  <bug-gnu-utils@gnu.org>\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar directory,  Next: unshar overwrite,  Prev: unshar usage,  Up: unshar Invocation": {
            "content": "This is the \"unpack into the directory `dir'\" option.  This option\ntakes a string argument `dir'.  The input file names are relative to\nthe current directory when the program was started.  This option tells\n`unshar' to insert a `cd <dir>' commad at the start of the `shar' text\nwritten to the shell.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar overwrite,  Next: unshar force,  Prev: unshar directory,  Up: unshar Invocation": {
            "content": "This is the \"overwrite any pre-existing files\" option.  This option is\npassed through as an option to the shar file.  Many shell archive\nscripts accept a `-c' argument to indicate that existing files should\nbe overwritten.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar force,  Next: unshar split-at,  Prev: unshar overwrite,  Up: unshar Invocation": {
            "content": "This is an alias for the `overwrite' option, *note the overwrite option\ndocumentation: unshar overwrite.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar split-at,  Next: unshar exit-0,  Prev: unshar force,  Up: unshar Invocation": {
            "content": "This is the \"split input on SPLIT-MARK lines\" option.  This option\ntakes a string argument `split-mark'.  With this option, `unshar'\nisolates each different shell archive from the others which have been\nplaced in the same file, unpacking each in turn, from the beginning of\nthe file to the end.  Its proper operation relies on the fact that many\nshar files are terminated by a readily identifiable string at the start\nof the last line.\n\nFor example, noticing that most `.signatures' have a double hyphen\n(\"-\") on a line right before them, one can then sometimes use\n`--split-at=--'.  The signature will then be skipped, along with the\nheaders of the following message.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar exit-0,  Next: unshar debug,  Prev: unshar split-at,  Up: unshar Invocation": {
            "content": "This is the \"split input on \"exit 0\" lines\" option.\n\nThis option has some usage constraints.  It:\n* must not appear in combination with any of the following options:\nsplit-at.\n\nMost shell archives end with a line consisting of simply \"exit 0\".\nThis option is equivalent to (and conflicts with) `--split-at=\"exit 0\"'.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar debug,  Next: unshar config,  Prev: unshar exit-0,  Up: unshar Invocation": {
            "content": "This is the \"debug the shell code\" option.  \"set -x\" will be emitted\ninto the code the shell interprets.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar config,  Next: unshar exit status,  Prev: unshar debug,  Up: unshar Invocation": {
            "content": "",
            "subsections": []
        },
        "Any option that is not marked as not presettable may be preset by": {
            "content": "loading values from configuration (\"rc\" or \"ini\") files.\n\n`libopts' will search in `$HOME' for configuration (option) data.  The\nenvironment variable `HOME, ' is expanded and replaced when the program\nruns If this is a plain file, it is simply processed.  If it is a\ndirectory, then a file named `.sharrc' is searched for within that\ndirectory.\n\nConfiguration files may be in a wide variety of formats.  The basic\nformat is an option name followed by a value (argument) on the same\nline.  Values may be separated from the option name with a colon, equal\nsign or simply white space.  Values may be continued across multiple\nlines by escaping the newline with a backslash.\n\nMultiple programs may also share the same initialization file.",
            "subsections": []
        },
        "Common options are collected at the top, followed by program specific": {
            "content": "segments.  The segments are separated by lines like:\n[UNSHAR]\nor by\n<?program unshar>\nDo not mix these styles within one configuration file.\n\nCompound values and carefully constructed string values may also be\nspecified using XML syntax:\n<option-name>\n<sub-opt>...&lt;...&gt;...</sub-opt>\n</option-name>\nyielding an `option-name.sub-opt' string value of\n\"...<...>...\"\n`AutoOpts' does not track suboptions.  You simply note that it is a\nhierarchicly valued option.  `AutoOpts' does provide a means for\nsearching the associated name/value pair list (see: optionFindValue).\n\nThe command line options relating to configuration and/or usage help\nare:\n\nversion (-v)\n............\n",
            "subsections": []
        },
        "Print the program version to standard out, optionally with licensing": {
            "content": "information, then exit 0.  The optional argument specifies how much\nlicensing detail to provide.  The default is to print the license name\nwith the version.  The licensing infomation may be selected with an\noption argument.  Only the first letter of the argument is examined:\n\n`version'\nOnly print the version.\n\n`copyright'\nName the copyright usage licensing terms.  This is the default.\n\n`verbose'\nPrint the full copyright usage licensing terms.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar exit status,  Next: unshar Authors,  Prev: unshar config,  Up: unshar Invocation": {
            "content": "One of the following exit values will be returned:\n`0 (EXITSUCCESS)'\nSuccessful program execution.\n\n`1 (EXITFAILURE)'\nThere was an error in command usage.\n\n`2 (EXITPOPENPROBLEM)'\ncannot spawn or write to a shell process\n\n`3 (EXITCANNOTCREATE)'\ncannot create output file\n\n`4 (EXITBADDIRECTORY)'\nthe working directory structure is invalid\n\n`5 (EXITNOMEM)'\nmemory allocation failure\n\n`6 (EXITINVALID)'\ninvalid input, does not contain a shar file\n\n`66 (EXNOINPUT)'\nA specified configuration file could not be loaded.\n\n`70 (EXSOFTWARE)'\nlibopts had an internal operational error.  Please report it to\nautogen-users@lists.sourceforge.net.  Thank you.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar Authors,  Next: unshar Bugs,  Prev: unshar exit status,  Up: unshar Invocation": {
            "content": "The `shar' and `unshar' programs is the collective work of many\nauthors.  Many people contributed by reporting problems, suggesting\nvarious improvements or submitting actual code.  A list of these people\nis in the `THANKS' file in the sharutils distribution.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar Bugs,  Next: unshar See Also,  Prev: unshar Authors,  Up: unshar Invocation": {
            "content": "Please put `sharutils' in the subject line for emailed bug reports.  It\nhelps to spot the message.\n",
            "subsections": []
        },
        "File: sharutils.info,  Node: unshar See Also,  Prev: unshar Bugs,  Up: unshar Invocation": {
            "content": "shar(1)\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}