unshar(1)
π unshar β like, the manual page bestie π
okay so welcome to unshar(1), the little icon that unpacks a shar archive. it's giving "your friend who opens the group-chat gift bag so nobody has to do it themselves." let's get into it π
β¨ NAME β¨
unshar β unpack a shar archive π¦
πΈ SYNOPSIS πΈ
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.
like bestie, stdin cannot be a terminal here, that's not a vibe it will accept, periodt π
π DESCRIPTION π
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.
so it literally sniffs out the archives, hands each one to the shell, and lets the shell do the unpacking. main character energy honestly π
β¨ OPTIONS β¨
-ddir,--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--overwriteoption.-Esplit-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.
lowkey genius. the signature gets ghosted along with the next message's headers π
-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".
not them being the same thing but refusing to be seen together π pick a lane bestie
-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.-rcfgfile,--load-opts=cfgfile,--no-load-optsβ Load options from cfgfile. Theno-load-optsform will disable the loading of earlier config/rc/ini files.--no-load-optsis handled early, out of order.-v[{v|c|n--version[{v|c|n}]}] β Output version of program and exit. The default mode isv, a simple version. Thecmode will print copyright information andnwill print the full copyright notice.
π§ OPTION PRESETS π§
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.
π FILES π
See OPTION PRESETS for configuration files.
π EXIT STATUS π
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 process3(EXIT_CANNOT_CREATE) β cannot create output file4(EXIT_BAD_DIRECTORY) β the working directory structure is invalid5(EXIT_NOMEM) β memory allocation failure6(EXIT_INVALID) β invalid input, does not contain a shar file66(EX_NOINPUT) β A specified configuration file could not be loaded.70(EX_SOFTWARE) β libopts had an internal operational error. Please report it toautogen-users@lists.sourceforge.net. Thank you.
bestie if you get a 70 that's not your fault, go tell the autogen people, they literally asked π
π SEE ALSO π
π«Ά 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.
like a whole group project that actually got finished, iconic β¨
π COPYRIGHT π
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.
π BUGS π
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
subject line = your moment to shine, don't skip it, it's how they find you in the inbox πΈ
β NOTES β
This manual page was AutoGen-erated from the unshar option definitions.
and that's the whole page bestie!! GNU sharutils (4.15.2), dated 30 May 2015 β go unpack something slay πβ¨π
π¦ where this page comes from
- alpine 3.22: sharutils-doc 4.15.2-r6 Β· GPL-3.0-or-later
- alpine 3.23: sharutils-doc 4.15.2-r6 Β· GPL-3.0-or-later
- alpine 3.24: sharutils-doc 4.15.2-r6 Β· GPL-3.0-or-later
- arch rolling: sharutils 4.15.2-6 Β· GPL-3.0-or-later
- centos-stream 10: sharutils 4.15.2-28.el10 Β· GPL-3.0-or-later AND (GPL-3.0-or-later AND BSD-4-Clause) AND (LGPL-3.0-or-later OR BSD-3-Clause) AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later
- centos-stream 9: sharutils 4.15.2-21.el9 Β· GPLv3+ and (GPLv3+ and BSD) and (LGPLv3+ or BSD) and LGPLv2+ and Public Domain and GFDL
- debian bookworm: sharutils 1:4.15.2-9
- debian trixie: sharutils 1:4.15.2-12
- fedora 43: sharutils 4.15.2-30.fc43 Β· GPL-3.0-or-later AND (GPL-3.0-or-later AND BSD-4-Clause) AND (LGPL-3.0-or-later OR BSD-3-Clause) AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later
- fedora 44: sharutils 4.15.2-31.fc44 Β· GPL-3.0-or-later AND (GPL-3.0-or-later AND BSD-4-Clause) AND (LGPL-3.0-or-later OR BSD-3-Clause) AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later
- nixos 26.05: sharutils 4.15.2
- nixpkgs unstable: sharutils 4.15.2
- opensuse-leap 16.0: sharutils 4.15.2-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: sharutils 4.15.2-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: sharutils 4.15.2-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: sharutils 4.15.2-160000.2.2 Β· GPL-3.0-or-later
- ubuntu jammy: sharutils 1:4.15.2-5build1
- ubuntu noble: sharutils 1:4.15.2-9
- ubuntu questing: sharutils 1:4.15.2-12
- ubuntu resolute: sharutils 1:4.15.2-13
- ubuntu stonking: sharutils 1:4.15.2-13
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms