unshar - unpack a shar archive
unshar [-flags] [-flag [value]] [--option-name[[=| ]value]] [<file>...] The operands that this program operates on may be specified either on the command line or read from standard input, one per line. In that input, leading and trailing white space is stripped, blank lines are ignored. Standard input may not be a terminal.
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 program will perform its function for every file named on the command line or every file named in a list read from stdin. The arguments or input names must be pre-existing files. The input list may contain comments, which are blank lines or lines beginning with a '#' character.
-d dir, --directory=dir unpack into the directory 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. -c, --overwrite overwrite any pre-existing files. 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. -f, --force This is an alias for the --overwrite option. -E split-mark, --split-at=split-mark split input on split-mark lines. The default split-mark for this option is: exit 0 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. -e, --exit-0 split input on "exit 0" lines. This option 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". -D, --debug debug the shell code. "set -x" will be emitted into the code the shell interprets. -h, --help Display usage information and exit. -!, --more-help Pass the extended usage information through a pager. -R [cfgfile], --save-opts [=cfgfile] Save the option state to cfgfile. The default is the last configuration file listed in the OPTION PRESETS section, below. The command will exit after updating the config file. -r cfgfile, --load-opts=cfgfile, --no-load-opts Load options from cfgfile. The no-load-opts form will disable the loading of earlier config/rc/ini files. --no-load-opts is handled early, out of order. -v [{v|c|n --version [{v|c|n}]}] Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice.
Any option that is not marked as not presettable may be preset by loading values from configuration ("RC" or ".INI") file(s). The file "$HOME/.sharrc" will be used, if present.
See OPTION PRESETS for configuration files.
One of the following exit values will be returned: 0 (EXIT_SUCCESS) Successful program execution. 1 (EXIT_FAILURE) There was an error in command usage. 2 (EXIT_POPEN_PROBLEM) cannot spawn or write to a shell process 3 (EXIT_CANNOT_CREATE) cannot create output file 4 (EXIT_BAD_DIRECTORY) the working directory structure is invalid 5 (EXIT_NOMEM) memory allocation failure 6 (EXIT_INVALID) invalid input, does not contain a shar file 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@lists.sourceforge.net. Thank you.
shar(1)
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.
Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later.
Please put sharutils in the subject line for emailed bug reports. It helps to spot the message. Please send bug reports to: bug-gnu-utils@gnu.org
This manual page was AutoGen-erated from the unshar option definitions.
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.