| 1 |
.de1 NOP |
| 2 |
. it 1 an-trap |
| 3 |
. if \\n[.$] \,\\$*\/ |
| 4 |
.. |
| 5 |
.ie t \ |
| 6 |
.ds B-Font [CB] |
| 7 |
.ds I-Font [CI] |
| 8 |
.ds R-Font [CR] |
| 9 |
.el \ |
| 10 |
.ds B-Font B |
| 11 |
.ds I-Font I |
| 12 |
.ds R-Font R |
| 13 |
.TH shar 1 "30 May 2015" "GNU sharutils (4.15.2)" "User Commands" |
| 14 |
.\" |
| 15 |
.\" DO NOT EDIT THIS FILE (in-mem file) |
| 16 |
.\" |
| 17 |
.\" It has been AutoGen-ed |
| 18 |
.\" From the definitions shar-opts.def |
| 19 |
.\" and the template file agman-cmd.tpl |
| 20 |
.SH NAME |
| 21 |
\f\*[B-Font]shar\fP |
| 22 |
\- create a shell archive |
| 23 |
.SH SYNOPSIS |
| 24 |
\f\*[B-Font]shar\fP |
| 25 |
.\" Mixture of short (flag) options and long options |
| 26 |
[\f\*[B-Font]\-flags\f[]] |
| 27 |
[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]] |
| 28 |
[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]] |
| 29 |
[<file>...] |
| 30 |
.sp \n(Ppu |
| 31 |
.ne 2 |
| 32 |
|
| 33 |
If no \fIfile\fPs are specified, the list of input files is read |
| 34 |
from standard input. Standard input must not be a terminal. |
| 35 |
.SH "DESCRIPTION" |
| 36 |
\fBshar\fP creates "shell archives" (or shar files) which are in |
| 37 |
text format and can be emailed. These files may be unpacked later by |
| 38 |
executing them with \fI/bin/sh\fP. The resulting archive is sent to |
| 39 |
standard out unless the \fB-o\fP option is given. A wide range of |
| 40 |
features provide extensive flexibility in manufacturing shars and in |
| 41 |
specifying \fBshar\fP "smartness". Archives may be fairly simple |
| 42 |
(\fB--vanilla-operation\fP) or essentially a mailable \fBtar\fP |
| 43 |
archive. |
| 44 |
.sp |
| 45 |
Options may be specified in any order until a \fBfile\fP argument is |
| 46 |
recognized. If the \fB--intermix-type\fP option has been specified, |
| 47 |
more compression and encoding options will be recognized between the |
| 48 |
\fIfile\fP arguments. |
| 49 |
.sp |
| 50 |
Though this program supports \fBuuencode\fP-d files, they |
| 51 |
are deprecated. If you are emailing files, please consider |
| 52 |
mime-encoded files. If you do \fBuuencode\fP, base64 is the |
| 53 |
preferred encoding method. |
| 54 |
.SH "OPTIONS" |
| 55 |
.SS "Specifying compression" |
| 56 |
.TP |
| 57 |
.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-intermix\-type\f[] |
| 58 |
specify compression for input files. |
| 59 |
This option must not appear in combination with any of the following options: |
| 60 |
vanilla-operation. |
| 61 |
.sp |
| 62 |
Allow positional parameter options. The compression method and |
| 63 |
encoding method options may be intermixed with file names. |
| 64 |
Files named after these options will be processed in the specified way. |
| 65 |
.TP |
| 66 |
.NOP \f\*[B-Font]\-C\f[] \f\*[I-Font]program\f[], \f\*[B-Font]\-\-compactor\f[]=\f\*[I-Font]program\f[] |
| 67 |
specify compaction (compression) program. |
| 68 |
This option may appear an unlimited number of times. |
| 69 |
This option must not appear in combination with any of the following options: |
| 70 |
vanilla-operation. |
| 71 |
.sp |
| 72 |
The \fBgzip\fP, \fBbzip2\fP and \fBcompress\fP compactor |
| 73 |
commands may be specified by the program name as the option name, |
| 74 |
e.g. \fB--gzip\fP. Those options, however, are being deprecated. |
| 75 |
There is also the \fBxz\fP compactor now. Specify \fBxz\fP |
| 76 |
with \fB-C xz\fP or \fB--compactor=xz\fP. |
| 77 |
.sp |
| 78 |
Specifying the compactor "\fBnone\fP" will disable file compression. |
| 79 |
Compressed files are never processed as plain text. They are always |
| 80 |
uuencoded and the recipient must have \fBuudecode\fP to unpack |
| 81 |
them. |
| 82 |
.sp |
| 83 |
Specifying the compactor \fBcompress\fP is deprecated. |
| 84 |
.TP |
| 85 |
.NOP \f\*[B-Font]\-g\f[] \f\*[I-Font]level\f[], \f\*[B-Font]\-\-level\-of\-compression\f[]=\f\*[I-Font]level\f[] |
| 86 |
pass \fILEVEL\fP for compression. |
| 87 |
This option takes an integer number as its argument. |
| 88 |
The value of |
| 89 |
\f\*[I-Font]level\f[] |
| 90 |
is constrained to being: |
| 91 |
.in +4 |
| 92 |
.nf |
| 93 |
.na |
| 94 |
in the range 1 through 9 |
| 95 |
.fi |
| 96 |
.in -4 |
| 97 |
The default |
| 98 |
\f\*[I-Font]level\f[] |
| 99 |
for this option is: |
| 100 |
.ti +4 |
| 101 |
9 |
| 102 |
.sp |
| 103 |
Some compression programs allow for a level of compression. The |
| 104 |
default is \fB9\fP, but this option allows you to specify something |
| 105 |
else. This value is used by \fBgzip\fP, \fBbzip2\fP and |
| 106 |
\fBxz\fP, but not \fBcompress\fP. |
| 107 |
.TP |
| 108 |
.NOP \f\*[B-Font]\-j\f[], \f\*[B-Font]\-\-bzip2\f[] |
| 109 |
\fBbzip2\fP and \fBuuencode\fP files. |
| 110 |
This option may appear an unlimited number of times. |
| 111 |
.sp |
| 112 |
\fBbzip2\fP compress and \fBuuencode\fP all files |
| 113 |
prior to packing. The recipient must have \fBuudecode\fP |
| 114 |
\fBbzip2\fP in order to unpack. |
| 115 |
.sp |
| 116 |
.B |
| 117 |
NOTE: THIS OPTION IS DEPRECATED |
| 118 |
.TP |
| 119 |
.NOP \f\*[B-Font]\-z\f[], \f\*[B-Font]\-\-gzip\f[] |
| 120 |
\fBgzip\fP and \fBuuencode\fP files. |
| 121 |
This option may appear an unlimited number of times. |
| 122 |
.sp |
| 123 |
\fBgzip\fP compress and \fBuuencode\fP all files prior |
| 124 |
to packing. The recipient must have \fBuudecode\fP and |
| 125 |
\fBgzip\fP in order to unpack. |
| 126 |
.sp |
| 127 |
.B |
| 128 |
NOTE: THIS OPTION IS DEPRECATED |
| 129 |
.TP |
| 130 |
.NOP \f\*[B-Font]\-Z\f[], \f\*[B-Font]\-\-compress\f[] |
| 131 |
\fBcompress\fP and \fBuuencode\fP files. |
| 132 |
This option may appear an unlimited number of times. |
| 133 |
.sp |
| 134 |
\fBcompress\fP and \fBuuencode\fP all files prior to |
| 135 |
packing. The recipient must have \fBuudecode\fP and |
| 136 |
\fBcompress\fP in order to unpack. |
| 137 |
.sp |
| 138 |
.B |
| 139 |
NOTE: THIS OPTION IS DEPRECATED |
| 140 |
.TP |
| 141 |
.NOP \f\*[B-Font]\-\-level-for-gzip\f[] |
| 142 |
This is an alias for the \fI--level-of-compression\fR option. |
| 143 |
.sp |
| 144 |
.B |
| 145 |
NOTE: THIS OPTION IS DEPRECATED |
| 146 |
.TP |
| 147 |
.NOP \f\*[B-Font]\-b\f[] \f\*[I-Font]bits\f[], \f\*[B-Font]\-\-bits\-per\-code\f[]=\f\*[I-Font]bits\f[] |
| 148 |
pass \fIbits\fP (default 12) to compress. |
| 149 |
The default |
| 150 |
\f\*[I-Font]bits\f[] |
| 151 |
for this option is: |
| 152 |
.ti +4 |
| 153 |
12 |
| 154 |
.sp |
| 155 |
This is the compression factor used by the \fBcompress\fP program. |
| 156 |
.sp |
| 157 |
.B |
| 158 |
NOTE: THIS OPTION IS DEPRECATED |
| 159 |
.SS "Specifying file encoding methodology" |
| 160 |
Files may be stored in the shar either as plain text or uuencoded. |
| 161 |
By default, the program selects which by examining the file. |
| 162 |
You may force the selection for all files. In intermixed option/file |
| 163 |
mode, this setting may be changed during processing. |
| 164 |
.TP |
| 165 |
.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-mixed\-uuencode\f[] |
| 166 |
decide uuencoding for each file. |
| 167 |
This option is a member of the mixed-uuencode class of options. |
| 168 |
.sp |
| 169 |
Automatically determine if the files are text or binary and archive |
| 170 |
correctly. Files found to be binary are uuencoded prior to packing. |
| 171 |
This is the default behavior for \fBshar\fP. |
| 172 |
.sp |
| 173 |
For a file to be considered a text file instead of a binary file, |
| 174 |
all the following should be true: |
| 175 |
.sp 1 |
| 176 |
The file does not contain any ASCII control character besides \fIBS\fP |
| 177 |
(backspace), \fIHT\fP (horizontal tab), \fILF\fP (new line) or |
| 178 |
\fIFF\fP (form feed). |
| 179 |
.sp 1 |
| 180 |
The file contains no character with its eighth-bit set. |
| 181 |
.sp 1 |
| 182 |
The file contains no line beginning with the five letters |
| 183 |
"\fBfrom \fP", capitalized or not. (Mail handling programs |
| 184 |
will often gratuitously insert a \fB>\fP character before it.) |
| 185 |
.sp 1 |
| 186 |
The file is either empty or ends with a \fILF\fP (newline) byte. |
| 187 |
.sp 1 |
| 188 |
No line in the file contains more than 200 characters. For counting |
| 189 |
purpose, lines are separated by a \fILF\fP (newline). |
| 190 |
.br |
| 191 |
.TP |
| 192 |
.NOP \f\*[B-Font]\-B\f[], \f\*[B-Font]\-\-uuencode\f[] |
| 193 |
treat all files as binary. |
| 194 |
This option is a member of the mixed-uuencode class of options. |
| 195 |
.sp |
| 196 |
Use \fBuuencode\fP prior to packing all files. This |
| 197 |
increases the size of the archive. The recipient must have |
| 198 |
\fBuudecode\fP in order to unpack. Compressed files are |
| 199 |
always encoded. |
| 200 |
.TP |
| 201 |
.NOP \f\*[B-Font]\-T\f[], \f\*[B-Font]\-\-text\-files\f[] |
| 202 |
treat all files as text. |
| 203 |
This option is a member of the mixed-uuencode class of options. |
| 204 |
.sp |
| 205 |
If you have files with non-ascii bytes or text that some mail handling |
| 206 |
programs do not like, you may find difficulties. However, if you are |
| 207 |
using FTP or SSH/SCP, the non-conforming text files should be okay. |
| 208 |
.SS "Specifying file selection and output modes" |
| 209 |
.TP |
| 210 |
.NOP \f\*[B-Font]\-o\f[] \f\*[I-Font]prefix\f[], \f\*[B-Font]\-\-output\-prefix\f[]=\f\*[I-Font]prefix\f[] |
| 211 |
print output to file PREFIX.nn. |
| 212 |
.sp |
| 213 |
Save the archive to files \fIprefix.01\fP thru \fIprefix.nn\fP |
| 214 |
instead of sending all output to standard out. Must be specified when |
| 215 |
the \fB--whole-size-limit\fP or \fB--split-size-limit\fP |
| 216 |
options are specified. |
| 217 |
.sp |
| 218 |
When \fBprefix\fP contains a \fB%\fP character, \fBprefix\fP is then |
| 219 |
interpreted as a \fBsprintf\fP format, which should be able to display |
| 220 |
a single decimal number. When \fBprefix\fP does not contain such a |
| 221 |
\fB%\fP character, the string \fB.%02d\fP is internally appended. |
| 222 |
.TP |
| 223 |
.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]size\f[], \f\*[B-Font]\-\-whole\-size\-limit\f[]=\f\*[I-Font]size\f[] |
| 224 |
split archive, not files, to \fIsize\fP. |
| 225 |
This option is a member of the whole-size-limit class of options. |
| 226 |
This option must appear in combination with the following options: |
| 227 |
output-prefix. |
| 228 |
This option takes an integer number as its argument. |
| 229 |
The value of |
| 230 |
\f\*[I-Font]size\f[] |
| 231 |
is constrained to being: |
| 232 |
.in +4 |
| 233 |
.nf |
| 234 |
.na |
| 235 |
in the range 8 through 1023, or |
| 236 |
in the range 8192 through 4194304 |
| 237 |
.fi |
| 238 |
.in -4 |
| 239 |
.sp |
| 240 |
Limit the output file size to \fIsize\fP bytes, but don't split input |
| 241 |
files. If \fIsize\fP is less than 1024, then it will be multiplied |
| 242 |
by 1024. The value may also be specified with a k, K, m or M suffix. |
| 243 |
The number is then multiplied by 1000, 1024, 1000000, or 1048576, |
| 244 |
respectively. 4M (4194304) is the maximum allowed. |
| 245 |
.sp |
| 246 |
Unlike the \fBsplit-size-limit\fP option, this allows the recipient |
| 247 |
of the shar files to unpack them in any order. |
| 248 |
.TP |
| 249 |
.NOP \f\*[B-Font]\-L\f[] \f\*[I-Font]size\f[], \f\*[B-Font]\-\-split\-size\-limit\f[]=\f\*[I-Font]size\f[] |
| 250 |
split archive or files to \fIsize\fP. |
| 251 |
This option is a member of the whole-size-limit class of options. |
| 252 |
This option must appear in combination with the following options: |
| 253 |
output-prefix. |
| 254 |
This option takes an integer number as its argument. |
| 255 |
The value of |
| 256 |
\f\*[I-Font]size\f[] |
| 257 |
is constrained to being: |
| 258 |
.in +4 |
| 259 |
.nf |
| 260 |
.na |
| 261 |
in the range 8 through 1023, or |
| 262 |
in the range 8192 through 4194304 |
| 263 |
.fi |
| 264 |
.in -4 |
| 265 |
.sp |
| 266 |
Limit output file size to \fIsize\fP bytes, splitting files if |
| 267 |
necessary. The allowed values are specified as with the |
| 268 |
\fB--whole-size-limit\fP option. |
| 269 |
.sp |
| 270 |
The archive parts created with this option must be unpacked in the |
| 271 |
correct order. If the recipient of the shell archives wants to put |
| 272 |
all of them in a single email folder (file), they will have to be |
| 273 |
saved in the correct order for \fBunshar\fP to unpack them all at |
| 274 |
once (using one of the split archive options). |
| 275 |
see: unshar Invocation. |
| 276 |
.TP |
| 277 |
.NOP \f\*[B-Font]\-I\f[] \f\*[I-Font]file\f[], \f\*[B-Font]\-\-input\-file\-list\f[]=\f\*[I-Font]file\f[] |
| 278 |
read file list from a file. |
| 279 |
.sp |
| 280 |
This option causes \fIfile\fP to be reopened as standard input. If |
| 281 |
no files are found on the input line, then standard input is read for |
| 282 |
input file names. Use of this option will prohibit input files from |
| 283 |
being listed on the command line. |
| 284 |
.sp |
| 285 |
Input must be in a form similar to that generated by \fBfind\fP, |
| 286 |
one filename per line. This switch is especially useful when the |
| 287 |
command line will not hold the list of files to be archived. |
| 288 |
.sp |
| 289 |
If the \fB--intermix-type\fP option is specified on the command |
| 290 |
line, then the compression options may be included in the standard |
| 291 |
input on lines by themselves and no file name may begin with a hyphen. |
| 292 |
.sp |
| 293 |
For example: |
| 294 |
.nf |
| 295 |
{ echo \--compact xz |
| 296 |
find . \-type f \-print | sort |
| 297 |
} | shar \-S \-p \-L50K \-o /somewhere/big |
| 298 |
.fi |
| 299 |
.TP |
| 300 |
.NOP \f\*[B-Font]\-S\f[], \f\*[B-Font]\-\-stdin\-file\-list\f[] |
| 301 |
read file list from standard input. |
| 302 |
.sp |
| 303 |
This option is actually a no-op. It is a wrapper for |
| 304 |
\fB--input-file-list=-\fP. |
| 305 |
.sp |
| 306 |
.B |
| 307 |
NOTE: THIS OPTION IS DEPRECATED |
| 308 |
.SS "Controlling the shar headers" |
| 309 |
.TP |
| 310 |
.NOP \f\*[B-Font]\-n\f[] \f\*[I-Font]name\f[], \f\*[B-Font]\-\-archive\-name\f[]=\f\*[I-Font]name\f[] |
| 311 |
use \fIname\fP to document the archive. |
| 312 |
.sp |
| 313 |
Name of archive to be included in the subject header of the shar |
| 314 |
files. See the \fB--net-headers\fP option. |
| 315 |
.TP |
| 316 |
.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]who@where\f[], \f\*[B-Font]\-\-submitter\f[]=\f\*[I-Font]who@where\f[] |
| 317 |
override the submitter name. |
| 318 |
.sp |
| 319 |
\fBshar\fP will normally determine the submitter name by querying |
| 320 |
the system. Use this option if it is being done on behalf of another. |
| 321 |
.TP |
| 322 |
.NOP \f\*[B-Font]\-a\f[], \f\*[B-Font]\-\-net\-headers\f[] |
| 323 |
output Submitted-by: & Archive-name: headers. |
| 324 |
This option must appear in combination with the following options: |
| 325 |
archive-name. |
| 326 |
.sp |
| 327 |
Adds specialized email headers: |
| 328 |
.nf |
| 329 |
Submitted-by: \fIwho@@where\fP |
| 330 |
Archive-name: \fIname\fP/part## |
| 331 |
.fi |
| 332 |
The \fIwho@@where\fP is normally derived, but can be specified with the |
| 333 |
\fB--submitter\fP option. The \fIname\fP must be provided with the |
| 334 |
\fB--archive-name\fP option. If the archive name includes a slash |
| 335 |
(\fB/\fP) character, then the \fB/part##\fP is omitted. Thus |
| 336 |
\fB-n xyzzy\fP produces: |
| 337 |
.nf |
| 338 |
xyzzy/part01 |
| 339 |
xyzzy/part02 |
| 340 |
.fi |
| 341 |
.sp |
| 342 |
while \fB-n xyzzy/patch\fP produces: |
| 343 |
.nf |
| 344 |
xyzzy/patch01 |
| 345 |
xyzzy/patch02 |
| 346 |
.fi |
| 347 |
.sp |
| 348 |
and \fB-n xyzzy/patch01.\fP produces: |
| 349 |
.nf |
| 350 |
xyzzy/patch01.01 |
| 351 |
xyzzy/patch01.02 |
| 352 |
.fi |
| 353 |
.TP |
| 354 |
.NOP \f\*[B-Font]\-c\f[], \f\*[B-Font]\-\-cut\-mark\f[] |
| 355 |
start the shar with a cut line. |
| 356 |
.sp |
| 357 |
A line saying 'Cut here' is placed at the |
| 358 |
start of each output file. |
| 359 |
.TP |
| 360 |
.NOP \f\*[B-Font]\-t\f[], \f\*[B-Font]\-\-translate\f[] |
| 361 |
translate messages in the script. |
| 362 |
.sp |
| 363 |
Translate messages in the script. If you have set the \fBLANG\fP |
| 364 |
environment variable, messages printed by \fBshar\fP will be in the |
| 365 |
specified language. The produced script will still be emitted using |
| 366 |
messages in the lingua franca of the computer world: English. This |
| 367 |
option will cause the script messages to appear in the languages |
| 368 |
specified by the \fBLANG\fP environment variable set when the script |
| 369 |
is produced. |
| 370 |
.SS "Protecting against transmission issues" |
| 371 |
.TP |
| 372 |
.NOP \f\*[B-Font]\-\-no\-character\-count\f[] |
| 373 |
do not use `wc \-c' to check size. |
| 374 |
.sp |
| 375 |
Do NOT check each file with 'wc \-c' after unpack. |
| 376 |
The default is to check. |
| 377 |
.TP |
| 378 |
.NOP \f\*[B-Font]\-D\f[], \f\*[B-Font]\-\-no\-md5\-digest\f[] |
| 379 |
do not use \fBmd5sum\fP digest to verify. |
| 380 |
.sp |
| 381 |
Do \fInot\fP use \fBmd5sum\fP digest to verify the unpacked files. |
| 382 |
The default is to check. |
| 383 |
.TP |
| 384 |
.NOP \f\*[B-Font]\-F\f[], \f\*[B-Font]\-\-force\-prefix\f[] |
| 385 |
apply the prefix character on every line. |
| 386 |
.sp |
| 387 |
Forces the prefix character to be prepended to every line, even if |
| 388 |
not required. This option may slightly increase the size of the archive, |
| 389 |
especially if \fB--uuencode\fP or a compression option is used. |
| 390 |
.TP |
| 391 |
.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]delim\f[], \f\*[B-Font]\-\-here\-delimiter\f[]=\f\*[I-Font]delim\f[] |
| 392 |
use \fIdelim\fP to delimit the files. |
| 393 |
The default |
| 394 |
\f\*[I-Font]delim\f[] |
| 395 |
for this option is: |
| 396 |
.ti +4 |
| 397 |
SHAR_EOF |
| 398 |
.sp |
| 399 |
Use DELIM to delimit the files in the shar instead of SHAR_EOF. |
| 400 |
This is for those who want to personalize their shar files. |
| 401 |
The delimiter will always be prefixed and suffixed with underscores. |
| 402 |
.SS "Producing different kinds of shars" |
| 403 |
.TP |
| 404 |
.NOP \f\*[B-Font]\-V\f[], \f\*[B-Font]\-\-vanilla\-operation\f[] |
| 405 |
produce very simple shars. |
| 406 |
.sp |
| 407 |
This option produces \fBvanilla\fP shars which rely only upon the |
| 408 |
existence of \fBecho\fP, \fBtest\fP and \fBsed\fP in the |
| 409 |
unpacking environment. |
| 410 |
.sp |
| 411 |
It changes the default behavior from mixed mode |
| 412 |
(\fB--mixed-uuencode\fP) to text mode (\fB--text-files\fP). |
| 413 |
Warnings are produced if options are specified that will require |
| 414 |
decompression or decoding in the unpacking environment. |
| 415 |
.TP |
| 416 |
.NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-no\-piping\f[] |
| 417 |
use temporary files between programs. |
| 418 |
.sp |
| 419 |
In the \fIshar\fP file, use a temporary file to hold file contents |
| 420 |
between unpacking stages instead of using pipes. This option is |
| 421 |
mandatory when you know the unpacking will happen on systems that do |
| 422 |
not support pipes. |
| 423 |
.TP |
| 424 |
.NOP \f\*[B-Font]\-x\f[], \f\*[B-Font]\-\-no\-check\-existing\f[] |
| 425 |
blindly overwrite existing files. |
| 426 |
.sp |
| 427 |
Create the archive so that when processed it will overwrite existing |
| 428 |
files without checking first. If neither this option nor the |
| 429 |
\fB--query-user\fP option is specified, the unpack will not |
| 430 |
overwrite pre-existing files. In all cases, however, if |
| 431 |
\fB--cut-mark\fP is passed as a parameter to the script when |
| 432 |
unpacking, then existing files will be overwritten unconditionally. |
| 433 |
.sp |
| 434 |
.nf |
| 435 |
sh shar-archive-file \-c |
| 436 |
.fi |
| 437 |
.TP |
| 438 |
.NOP \f\*[B-Font]\-X\f[], \f\*[B-Font]\-\-query\-user\f[] |
| 439 |
ask user before overwriting files. |
| 440 |
This option must not appear in combination with any of the following options: |
| 441 |
vanilla-operation. |
| 442 |
.sp |
| 443 |
When unpacking, interactively ask the user if files should be |
| 444 |
overwritten. Do not use for shars submitted to the net. |
| 445 |
.sp |
| 446 |
Use of this option produces shars which \fIwill\fP cause problems |
| 447 |
with some unshar-style procedures, particularly when used |
| 448 |
together with vanilla mode (\fB--vanilla-operation\fP). Use this |
| 449 |
feature mainly for archives to be passed among agreeable parties. |
| 450 |
Certainly, \fB-X\fP is \fInot\fP for shell archives which are to be |
| 451 |
submitted to Usenet or other public networks. |
| 452 |
.sp |
| 453 |
The problem is that \fBunshar\fP programs or procedures often feed |
| 454 |
\fI/bin/sh\fP from its standard input, thus putting \fI/bin/sh\fP |
| 455 |
and the shell archive script in competition for input lines. As an |
| 456 |
attempt to alleviate this problem, \fBshar\fP will try to detect |
| 457 |
if \fI/dev/tty\fP exists at the receiving site and will use it to |
| 458 |
read user replies. But this does not work in all cases, it may happen |
| 459 |
that the receiving user will have to avoid using \fBunshar\fP |
| 460 |
programs or procedures, and call \fI/bin/sh\fP directly. In vanilla |
| 461 |
mode, using \fI/dev/tty\fP is not even attempted. |
| 462 |
.TP |
| 463 |
.NOP \f\*[B-Font]\-m\f[], \f\*[B-Font]\-\-no\-timestamp\f[] |
| 464 |
do not restore modification times. |
| 465 |
.sp |
| 466 |
Avoid generating 'touch' commands to restore the file modification |
| 467 |
dates when unpacking files from the archive. |
| 468 |
.sp |
| 469 |
When file modification times are not preserved, project build programs |
| 470 |
like "make" will see built files older than the files they get built |
| 471 |
from. This is why, when this option is not used, a special effort is |
| 472 |
made to restore timestamps. |
| 473 |
.TP |
| 474 |
.NOP \f\*[B-Font]\-Q\f[], \f\*[B-Font]\-\-quiet\-unshar\f[] |
| 475 |
avoid verbose messages at unshar time. |
| 476 |
.sp |
| 477 |
Verbose OFF. Disables the inclusion of comments to be output when |
| 478 |
the archive is unpacked. |
| 479 |
.TP |
| 480 |
.NOP \f\*[B-Font]\-f\f[], \f\*[B-Font]\-\-basename\f[] |
| 481 |
restore in one directory, despite hierarchy. |
| 482 |
.sp |
| 483 |
Restore by the base file name only, rather than path. This option |
| 484 |
causes only file names to be used, which is useful when building a |
| 485 |
shar from several directories, or another directory. Note that if a |
| 486 |
directory name is passed to shar, the substructure of that directory |
| 487 |
will be restored whether this option is specified or not. |
| 488 |
.SS "Internationalization options" |
| 489 |
.TP |
| 490 |
.NOP \f\*[B-Font]\-\-no\-i18n\f[] |
| 491 |
do not internationalize. |
| 492 |
.sp |
| 493 |
Do not produce internationalized shell archives, use default English |
| 494 |
messages. By default, shar produces archives that will try to output |
| 495 |
messages in the unpackers preferred language (as determined by the |
| 496 |
LANG/LC_MESSAGES environmental variables) when they are unpacked. If |
| 497 |
no message file for the unpackers language is found at unpack time, |
| 498 |
messages will be in English. |
| 499 |
.TP |
| 500 |
.NOP \f\*[B-Font]\-\-print\-text\-domain\-dir\f[] |
| 501 |
print directory with shar messages. |
| 502 |
.sp |
| 503 |
Prints the directory shar looks in to find messages files |
| 504 |
for different languages, then immediately exits. |
| 505 |
.SS "User feedback/entertainment" |
| 506 |
.TP |
| 507 |
.NOP \f\*[B-Font]\-q\f[], \f\*[B-Font]\-\-quiet\f[] |
| 508 |
do not output verbose messages. |
| 509 |
.sp |
| 510 |
omit progress messages. |
| 511 |
.TP |
| 512 |
.NOP \f\*[B-Font]\-\-silent\f[] |
| 513 |
This is an alias for the \fI--quiet\fR option. |
| 514 |
.TP |
| 515 |
.NOP \f\*[B-Font]\-h\f[], \f\*[B-Font]\-\-help\f[] |
| 516 |
Display usage information and exit. |
| 517 |
.TP |
| 518 |
.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[] |
| 519 |
Pass the extended usage information through a pager. |
| 520 |
.TP |
| 521 |
.NOP \f\*[B-Font]\-R\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]] |
| 522 |
Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP |
| 523 |
configuration file listed in the \fBOPTION PRESETS\fP section, below. |
| 524 |
The command will exit after updating the config file. |
| 525 |
.TP |
| 526 |
.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[] |
| 527 |
Load options from \fIcfgfile\fP. |
| 528 |
The \fIno-load-opts\fP form will disable the loading |
| 529 |
of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early, |
| 530 |
out of order. |
| 531 |
.TP |
| 532 |
.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[]}]}] |
| 533 |
Output version of program and exit. The default mode is `v', a simple |
| 534 |
version. The `c' mode will print copyright information and `n' will |
| 535 |
print the full copyright notice. |
| 536 |
.PP |
| 537 |
.SH "OPTION PRESETS" |
| 538 |
Any option that is not marked as \fInot presettable\fP may be preset |
| 539 |
by loading values from configuration ("RC" or ".INI") file(s). |
| 540 |
The file "\fI$HOME/.sharrc\fP" will be used, if present. |
| 541 |
.SH WARNINGS |
| 542 |
No attempt is made to restore the protection and modification dates |
| 543 |
for directories, even if this is done by default for files. Thus, if |
| 544 |
a directory is given to \fBshar\fP, the protection and modification |
| 545 |
dates of corresponding unpacked directory may not match those of the |
| 546 |
original. |
| 547 |
.sp |
| 548 |
If a directory is passed to shar, it may be scanned more than once, to |
| 549 |
conserve memory. Therefore, do not change the directory contents |
| 550 |
while shar is running. |
| 551 |
.sp |
| 552 |
Be careful that the output file(s) are not included in the inputs or |
| 553 |
shar may loop until the disk fills up. Be particularly careful when a |
| 554 |
directory is passed to shar that the output files are not in that |
| 555 |
directory or a subdirectory of it. |
| 556 |
.sp |
| 557 |
Use of the compression and encoding options will slow the archive |
| 558 |
process, perhaps considerably. |
| 559 |
.sp |
| 560 |
Use of the \fB\-\-query\-user\fP produces shars which \fIwill\fP |
| 561 |
cause problems with many unshar procedures. Use this feature only for |
| 562 |
archives to be passed among agreeable parties. Certainly, |
| 563 |
\fBquery\-user\fP is NOT for shell archives which are to be |
| 564 |
distributed across the net. The use of compression in net shars will |
| 565 |
cause you to be flamed off the earth. Not using the |
| 566 |
\fB\-\-no\-timestamp\fP or \fB\-\-force\-prefix\fP options may also |
| 567 |
get you occasional complaints. Put these options into your |
| 568 |
\fI~/.sharrc\fP file. |
| 569 |
.SH "FILES" |
| 570 |
See \fBOPTION PRESETS\fP for configuration files. |
| 571 |
.SH EXAMPLES |
| 572 |
The first shows how to make a shell archive out of all C program |
| 573 |
sources. The second produces a shell archive with all \fI.c\fP and |
| 574 |
\fI.h\fP files, which unpacks silently. The third gives a shell |
| 575 |
archive of all uuencoded \fI.arc\fP files, into numbered files |
| 576 |
starting from \fIarc.sh.01\fP. The last example gives a shell |
| 577 |
archive which will use only the file names at unpack time. |
| 578 |
.sp |
| 579 |
.br |
| 580 |
.in +4 |
| 581 |
.nf |
| 582 |
shar *.c > cprog.shar |
| 583 |
shar \-Q *.[ch] > cprog.shar |
| 584 |
shar \-B \-l28 \-oarc.sh *.arc |
| 585 |
shar \-f /lcl/src/u*.c > u.sh |
| 586 |
.in -4 |
| 587 |
.fi |
| 588 |
.SH "EXIT STATUS" |
| 589 |
One of the following exit values will be returned: |
| 590 |
.TP |
| 591 |
.NOP 0 " (EXIT_SUCCESS)" |
| 592 |
Successful program execution. |
| 593 |
.TP |
| 594 |
.NOP 1 " (EXIT_OPTION_ERROR)" |
| 595 |
The command options were misconfigured. |
| 596 |
.TP |
| 597 |
.NOP 2 " (EXIT_FILE_NOT_FOUND)" |
| 598 |
a specified input could not be found |
| 599 |
.TP |
| 600 |
.NOP 3 " (EXIT_CANNOT_OPENDIR)" |
| 601 |
open/close of specified directory failed |
| 602 |
.TP |
| 603 |
.NOP 4 " (EXIT_FAILED)" |
| 604 |
Resource limit/miscelleaneous shar command failure |
| 605 |
.TP |
| 606 |
.NOP 63 " (EXIT_BUG)" |
| 607 |
There is a shar command bug. Please report it. |
| 608 |
.TP |
| 609 |
.NOP 66 " (EX_NOINPUT)" |
| 610 |
A specified configuration file could not be loaded. |
| 611 |
.TP |
| 612 |
.NOP 70 " (EX_SOFTWARE)" |
| 613 |
libopts had an internal operational error. Please report |
| 614 |
it to [email protected]. Thank you. |
| 615 |
.PP |
| 616 |
.SH "SEE ALSO" |
| 617 |
unshar(1) |
| 618 |
.SH AUTHORS |
| 619 |
The \fIshar\fP and \fIunshar\fP programs is the collective work of |
| 620 |
many authors. Many people contributed by reporting problems, |
| 621 |
suggesting various improvements or submitting actual code. A list of |
| 622 |
these people is in the \fITHANKS\fP file in the sharutils distribution. |
| 623 |
.SH "COPYRIGHT" |
| 624 |
Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved. |
| 625 |
This program is released under the terms of the GNU General Public License, version 3 or later. |
| 626 |
.SH BUGS |
| 627 |
Please put \fBsharutils\fP in the subject line for emailed bug |
| 628 |
reports. It helps to spot the message. |
| 629 |
.sp \n(Ppu |
| 630 |
.ne 2 |
| 631 |
|
| 632 |
Please send bug reports to: [email protected] |
| 633 |
.SH "NOTES" |
| 634 |
This manual page was \fIAutoGen\fP-erated from the \fBshar\fP |
| 635 |
option definitions. |