1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
.de1 NOP
. it 1 an-trap
. if \\n[.$] \,\\$*\/
..
.ie t \
.ds B-Font [CB]
.ds I-Font [CI]
.ds R-Font [CR]
.el \
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH unshar 1 "30 May 2015" "GNU sharutils (4.15.2)" "User Commands"
.\"
.\" DO NOT EDIT THIS FILE (in-mem file)
.\"
.\" It has been AutoGen-ed
.\" From the definitions unshar-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
\f\*[B-Font]unshar\fP
\- unpack a shar archive
.SH SYNOPSIS
\f\*[B-Font]unshar\fP
.\" Mixture of short (flag) options and long options
[\f\*[B-Font]\-flags\f[]]
[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
[<file>...]
.sp \n(Ppu
.ne 2
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.
.sp \n(Ppu
.ne 2
.SH "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.
.sp \n(Ppu
.ne 2
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.
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]dir\f[], \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]dir\f[]
unpack into the directory \fIdir\fP.
.sp
The input file names are relative to the current directory
when the program was started. This option tells \fBunshar\fP
to insert a \fBcd <dir>\fP commad at the start of the
\fBshar\fP text written to the shell.
.TP
.NOP \f\*[B-Font]\-c\f[], \f\*[B-Font]\-\-overwrite\f[]
overwrite any pre-existing files.
.sp
This option is passed through as an option to the shar file. Many
shell archive scripts accept a \fB-c\fP argument to indicate that
existing files should be overwritten.
.TP
.NOP \f\*[B-Font]\-f\f[], \f\*[B-Font]\-\-force\f[]
This is an alias for the \fI--overwrite\fR option.
.TP
.NOP \f\*[B-Font]\-E\f[] \f\*[I-Font]split\-mark\f[], \f\*[B-Font]\-\-split\-at\f[]=\f\*[I-Font]split\-mark\f[]
split input on \fBsplit-mark\fP lines.
The default
\f\*[I-Font]split\-mark\f[]
for this option is:
.ti +4
exit 0
.sp
With this option, \fBunshar\fP 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.
.sp
For example, noticing that most `.signatures' have a double hyphen
("--") on a line right before them, one can then sometimes use
\fB--split-at=--\fP. The signature will then be skipped, along with
the headers of the following message.
.TP
.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-exit\-0\f[]
split input on "exit 0" lines.
This option must not appear in combination with any of the following options:
split-at.
.sp
Most shell archives end with a line consisting of simply "exit 0".
This option is equivalent to (and conflicts with)
\fB--split-at="exit 0"\fP.
.TP
.NOP \f\*[B-Font]\-D\f[], \f\*[B-Font]\-\-debug\f[]
debug the shell code.
.sp
"set \-x" will be emitted into the code the shell interprets.
.TP
.NOP \f\*[B-Font]\-h\f[], \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
.TP
.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
Pass the extended usage information through a pager.
.TP
.NOP \f\*[B-Font]\-R\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
configuration file listed in the \fBOPTION PRESETS\fP section, below.
The command will exit after updating the config file.
.TP
.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
Load options from \fIcfgfile\fP.
The \fIno-load-opts\fP form will disable the loading
of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
out of order.
.TP
.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
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.
.PP
.SH "OPTION PRESETS"
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from configuration ("RC" or ".INI") file(s).
The file "\fI$HOME/.sharrc\fP" will be used, if present.
.SH "FILES"
See \fBOPTION PRESETS\fP for configuration files.
.SH "EXIT STATUS"
One of the following exit values will be returned:
.TP
.NOP 0 " (EXIT_SUCCESS)"
Successful program execution.
.TP
.NOP 1 " (EXIT_FAILURE)"
There was an error in command usage.
.TP
.NOP 2 " (EXIT_POPEN_PROBLEM)"
cannot spawn or write to a shell process
.TP
.NOP 3 " (EXIT_CANNOT_CREATE)"
cannot create output file
.TP
.NOP 4 " (EXIT_BAD_DIRECTORY)"
the working directory structure is invalid
.TP
.NOP 5 " (EXIT_NOMEM)"
memory allocation failure
.TP
.NOP 6 " (EXIT_INVALID)"
invalid input, does not contain a shar file
.TP
.NOP 66 " (EX_NOINPUT)"
A specified configuration file could not be loaded.
.TP
.NOP 70 " (EX_SOFTWARE)"
libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.PP
.SH "SEE ALSO"
shar(1)
.SH AUTHORS
The \fIshar\fP and \fIunshar\fP 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 \fITHANKS\fP file in the sharutils distribution.
.SH "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.
.SH BUGS
Please put \fBsharutils\fP in the subject line for emailed bug
reports. It helps to spot the message.
.sp \n(Ppu
.ne 2
Please send bug reports to: bug-gnu-utils@gnu.org
.SH "NOTES"
This manual page was \fIAutoGen\fP-erated from the \fBunshar\fP
option definitions.
|