Dec 132017
 
Shell archive utilities version 3.32 for LINUX: shar, unshar, man pages, and source code.
File LX-SHAR.ZIP from The Programmer’s Corner in
Category UNIX Files
Shell archive utilities version 3.32 for LINUX: shar, unshar, man pages, and source code.
File Name File Size Zip Size Zip Type
README 9514 4063 deflated
README.1ST 616 321 deflated
SHAR 60614 27951 deflated
SHAR.1 6433 2791 deflated
SHAR332.TAR 74796 21610 deflated
UNSHAR 42118 18423 deflated
UNSHAR.1 1261 731 deflated

Download File LX-SHAR.ZIP Here

Contents of the README file


This file last revised Wed Jun 13 18:57:32 EDT 1990

Here is shar 3.30, an updated version of shar 3.11, derived from 'shar2'.
This offering is the work of many people. Thanks to [email protected] (Richard H.
Gumpertz), [email protected] (Colas Nahaboo), [email protected] (Bill
Aten) and [email protected] and maaaany others.

This version's shar:
1) generates shell code which attempts to create missing directories
2) handle deviants sun, vax, pyramid, sequent, and SCO XENIX/UNIX
automatically; for system V systems I did not catch, add -DSYS5
to CFLAGS; for other BSD-like systems, add -DBSD42
3) if unsharing system's touch is Sys V compatible (allows touch -m),
the unshar process restores file dates
4) An archive name may be specified for includion in the header
of the shar files( -n switch)
5) allows automatic generation of "Submitted-by: [email protected]" &
"Archive-name: /part##" headers
6) uses getopt; no good system library should be without a copy
but it is readily available (like look in unshar.c)
7) other chrome-plated junque

This version's unshar:
1) can change directory before unsharing
2) can unshar from standard in, from a COLLECTION of shars,
from a file containing multiple concatenated shars,
or a mixture of shar files and concatenated-shar files.
3) does not have an Social Security number.

------------------------ shar usage -----------------------------------
shar 3.30
usage: shar [ options ] file [ file1 ... ] ]
-V produce "vanilla" shars demanding little of the unshar environment
-v verbose messages OFF while executing
-w don't check with 'wc -c' after unpack
-n Name of archive (documentation)
-a Generate Submitted-by: & Archive-name: headers
-s override automatically determined submitter name
-x don't overwrite existing files
-X interactively overwrite existing files (NOT FOR NET SHARS)
-b treat all files as binary, use uuencode
-t treat all files as text (default)
-C compress and uuencode all files
-p allow positional parameter options. The options "-b" and "-t"
and "-C" may be embedded, and files to the right of the
option will be processed in the specified mode
-M mixed mode. Determine if the files are text or
binary and archive correctly.
-P use temp files instead of pipes in the shar file
-c start the shar with a cut line
-f restore by filename only, rather than path
-dXXX use XXX to delimit the files in the shar
-oXXX (or -o XXX) output to file XXX.01 thru XXX.nn
-lXX limit output file size to XXk bytes (but don't split files)
-LXX limit output file size to XXk bytes (may split files)
-S read files to wrap from stdin, ignoring argument line

The -S option reads filenames one per line from stdin; input
format must be similar to 'find' output, except that if -p
is specified, -b, -t or -C may be used (on lines by themselves)
e.g., find . -type f -print | sort | shar -C -L50 -o /tmp/big

The 'o' option is required if the 'l' or 'L' option is used
The 'n' option is required if the 'a' option is used
The 'x' and 'L' options are incompatible

-a generates sharname/part## headers. If the -a argument contains
a '/', then /patch is not appended
The automatic submitter name is trivial: essentially `whoami`@`uname`

------------------------ unshar usage -----------------------------------
Unshar has no usage built in. It has default actions when invoked
with no arguments (read from stdin).

Usage: unshar [-c] [-C exit_line] [ -d directory ] [ file ] ...

The -d flag tells unshar to change directory before unsharing

It can unshar shar files concatenated in one file, with the
the "-c" command, which separates files by recognizing the
"exit 0" string at the beginning of a line

(The -C string option allows you to specify this string, thus
-c is equivalent to -C "exit 0")


--------------------- history -----------------------------------------
Changes since 3.11: kudos to [email protected] (Richard H. Gumpertz)

1. The -l switch still specifies a maximum size for the generated
shar files, but now it prevents files from spanning shar parts.
Shars generated using this method may be unpacked in any order.

2. The old -l switch functionality is precisely emulated by using the
the -L switch. That is, archived files may be split across parts.
Shars generated using this method must still be unpacked in order.

3. The -C switch causes files to be compressed, then uuencoded.
Unpacking reverses the process.

4. The -P causes the shar to use temp files instead of pipes in
the unshar process.

5. The -f causes files to be resotred by name only (i.e., strip
directory portion of input filenames before placing the name
into the shar.


Changes since 3.20: kudos to [email protected] (Colas Nahaboo)

1. The Archived-name: header no longer uses "/part" if there is
a "/" in the -n name. Thus
-n xyzzy procduces:
xyzzy/part01
xyzzy/part02

-n xyzzy/patch procduces:
xyzzy/patch01
xyzzy/patch02

-n xyzzy/patch01. procduces:
xyzzy/patch01.01
xyzzy/patch01.02
2. The Archive-name part number other than part01 had no leading zero
in the number.

3. The "Submitted-by:" header was missing the hyphen (minus for olde
UNIX hackres).

4. The unshar program may now unshar a whole mailbox or concatenation
of shar files.

-C "string" looks for "string" at the beginning of the line to
break the file into individual shar files
-c is equivalent to -C "exit 0"

This of course will only work if there is something in the shar
file recognizable to terminate the shar. Some shars dont have
"exit 0" at the end. However, a clue: most/many .signatures have
"--" on a line right before them.

5. Unshar -d (change directory) no longer makes argv files unreachable.
I had never used the feature until the other day. I guess the
author has used in only for unsharing from stdin.

Changes since 3.21: thanks to Adri Verhoef,

1. Some vaxen do not run BSD. I guess I knew this, but -er-
here is Adri's note:
> Hi Warren,
>
> I encountered a problem trying to get 'shar3.21' to compile on System V
> on a vax. Yes, can you believe it? We run System V Release 3.0 on VAXen!
> The shar3.21 code assumes that you are BSD if you're on a vax. This is not
> always true! What I did to get the code compiled on System V, was:
> (+) edit the Makefile and add -DSYS5 to CFLAGS.
> (+) edit all the C-source files to circumcise compiler warnings
> ("SYS5 redefined").
>

He made a suggestion about having a localize.sh edit a distribution
Makefile, but for now, I'll just suggest you add -DSYS5 to CFLAGS
manually.

2. [email protected] (Jan Dj{rv, sorry about the screwed up character
translation, Jan) wrote man pages. Thanks!

Changes since 3.22: thanks to Dennis Boylan

1. The new -S option allows the list of files to be packed
to be read from the standard input rather than from the
command line.

2. A few purist checks were made to ensure fork() or malloc()
doesn't fail and excite the "if 20 hours of your time is
free then why isn't 200?" crowd (who probably will never see
this revision anyway :-))

Changes since 3.23:

1. The -V mode was added.

2. Altos doesn't like the '@' in filenames. The filename format
was changed. Thanks to [email protected]

Changes since 3.24:

1. Man pages were revised by [email protected] (Gordon Moffet). Thanks.

2. When -L was specified, the "Starting ..." message was not
produced on standard error (with or without -v).

3. When using -X, the 'not for net' warning was printed on standard
output rather thsn standard error.

4. [email protected] reccommends adding -F 5000 to the load
line of unshar when using on XENIX 286 to avoid stack overflow
core dumps. I added this information to an excellkent remake
of the Makefile by [email protected]

Changes since 3.25:

1. Fixed one minor bug with -a/-n. The period supplied when a
slash appears in the -n name was omitted. This is a hatefully
small bug to fix and reissue a whole release, but
a) several new names are on the sharlist now and they have
only 3.24 to work with,
b) this will surely sync us all up, and
c) I think it will put shar to bed for a while ("no known bugs
at this ti ... bus error core dumped").

Changes since 3.27:

1. The unshar-time test for a touch -m facility now greps for
'mmdd', not '[-amc]', making it more universally successful.

2. NOTE: there is still a problem with -n arguments using
a 'x/y' construct, but I don't know how to properly generalize
it so you'll have to edit shars made with some uses of -a
with -n x/y.

3. This is surely my last work on this. It does everything
I needed and more. Thanks for all the help and suggestions.
It seems as though we didn't precipitate 'death of the shar'
after all ๐Ÿ™‚ ๐Ÿ™‚ :-).

---------------------------------------------------------------------
Warren Tucker, TuckerWare emory!n4hgf!wht or [email protected]
{gatech,emory,tridom,kd4nc}!n4hgf!wht (404)587-5766
wht%[email protected]


Contents of the README.1ST file


This file last revised Wed Jun 13 18:57:32 EDT 1990

Here is shar 3.30, an updated version of shar 3.11, derived from 'shar2'.
This offering is the work of many people. Thanks to [email protected] (Richard H.
Gumpertz), [email protected] (Colas Nahaboo), [email protected] (Bill
Aten) and [email protected] and maaaany others.

This version's shar:
1) generates shell code which attempts to create missing directories
2) handle deviants sun, vax, pyramid, sequent, and SCO XENIX/UNIX
automatically; for system V systems I did not catch, add -DSYS5
to CFLAGS; for other BSD-like systems, add -DBSD42
3) if unsharing system's touch is Sys V compatible (allows touch -m),
the unshar process restores file dates
4) An archive name may be specified for includion in the header
of the shar files( -n switch)
5) allows automatic generation of "Submitted-by: [email protected]" &
"Archive-name: /part##" headers
6) uses getopt; no good system library should be without a copy
but it is readily available (like look in unshar.c)
7) other chrome-plated junque

This version's unshar:
1) can change directory before unsharing
2) can unshar from standard in, from a COLLECTION of shars,
from a file containing multiple concatenated shars,
or a mixture of shar files and concatenated-shar files.
3) does not have an Social Security number.

------------------------ shar usage -----------------------------------
shar 3.30
usage: shar [ options ] file [ file1 ... ] ]
-V produce "vanilla" shars demanding little of the unshar environment
-v verbose messages OFF while executing
-w don't check with 'wc -c' after unpack
-n Name of archive (documentation)
-a Generate Submitted-by: & Archive-name: headers
-s override automatically determined submitter name
-x don't overwrite existing files
-X interactively overwrite existing files (NOT FOR NET SHARS)
-b treat all files as binary, use uuencode
-t treat all files as text (default)
-C compress and uuencode all files
-p allow positional parameter options. The options "-b" and "-t"
and "-C" may be embedded, and files to the right of the
option will be processed in the specified mode
-M mixed mode. Determine if the files are text or
binary and archive correctly.
-P use temp files instead of pipes in the shar file
-c start the shar with a cut line
-f restore by filename only, rather than path
-dXXX use XXX to delimit the files in the shar
-oXXX (or -o XXX) output to file XXX.01 thru XXX.nn
-lXX limit output file size to XXk bytes (but don't split files)
-LXX limit output file size to XXk bytes (may split files)
-S read files to wrap from stdin, ignoring argument line

The -S option reads filenames one per line from stdin; input
format must be similar to 'find' output, except that if -p
is specified, -b, -t or -C may be used (on lines by themselves)
e.g., find . -type f -print | sort | shar -C -L50 -o /tmp/big

The 'o' option is required if the 'l' or 'L' option is used
The 'n' option is required if the 'a' option is used
The 'x' and 'L' options are incompatible

-a generates sharname/part## headers. If the -a argument contains
a '/', then /patch is not appended
The automatic submitter name is trivial: essentially `whoami`@`uname`

------------------------ unshar usage -----------------------------------
Unshar has no usage built in. It has default actions when invoked
with no arguments (read from stdin).

Usage: unshar [-c] [-C exit_line] [ -d directory ] [ file ] ...

The -d flag tells unshar to change directory before unsharing

It can unshar shar files concatenated in one file, with the
the "-c" command, which separates files by recognizing the
"exit 0" string at the beginning of a line

(The -C string option allows you to specify this string, thus
-c is equivalent to -C "exit 0")


--------------------- history -----------------------------------------
Changes since 3.11: kudos to [email protected] (Richard H. Gumpertz)

1. The -l switch still specifies a maximum size for the generated
shar files, but now it prevents files from spanning shar parts.
Shars generated using this method may be unpacked in any order.

2. The old -l switch functionality is precisely emulated by using the
the -L switch. That is, archived files may be split across parts.
Shars generated using this method must still be unpacked in order.

3. The -C switch causes files to be compressed, then uuencoded.
Unpacking reverses the process.

4. The -P causes the shar to use temp files instead of pipes in
the unshar process.

5. The -f causes files to be resotred by name only (i.e., strip
directory portion of input filenames before placing the name
into the shar.


Changes since 3.20: kudos to [email protected].inria.fr (Colas Nahaboo)

1. The Archived-name: header no longer uses "/part" if there is
a "/" in the -n name. Thus
-n xyzzy procduces:
xyzzy/part01
xyzzy/part02

-n xyzzy/patch procduces:
xyzzy/patch01
xyzzy/patch02

-n xyzzy/patch01. procduces:
xyzzy/patch01.01
xyzzy/patch01.02
2. The Archive-name part number other than part01 had no leading zero
in the number.

3. The "Submitted-by:" header was missing the hyphen (minus for olde
UNIX hackres).

4. The unshar program may now unshar a whole mailbox or concatenation
of shar files.

-C "string" looks for "string" at the beginning of the line to
break the file into individual shar files
-c is equivalent to -C "exit 0"

This of course will only work if there is something in the shar
file recognizable to terminate the shar. Some shars dont have
"exit 0" at the end. However, a clue: most/many .signatures have
"--" on a line right before them.

5. Unshar -d (change directory) no longer makes argv files unreachable.
I had never used the feature until the other day. I guess the
author has used in only for unsharing from stdin.

Changes since 3.21: thanks to Adri Verhoef,

1. Some vaxen do not run BSD. I guess I knew this, but -er-
here is Adri's note:
> Hi Warren,
>
> I encountered a problem trying to get 'shar3.21' to compile on System V
> on a vax. Yes, can you believe it? We run System V Release 3.0 on VAXen!
> The shar3.21 code assumes that you are BSD if you're on a vax. This is not
> always true! What I did to get the code compiled on System V, was:
> (+) edit the Makefile and add -DSYS5 to CFLAGS.
> (+) edit all the C-source files to circumcise compiler warnings
> ("SYS5 redefined").
>

He made a suggestion about having a localize.sh edit a distribution
Makefile, but for now, I'll just suggest you add -DSYS5 to CFLAGS
manually.

2. [email protected] (Jan Dj{rv, sorry about the screwed up character
translation, Jan) wrote man pages. Thanks!

Changes since 3.22: thanks to Dennis Boylan

1. The new -S option allows the list of files to be packed
to be read from the standard input rather than from the
command line.

2. A few purist checks were made to ensure fork() or malloc()
doesn't fail and excite the "if 20 hours of your time is
free then why isn't 200?" crowd (who probably will never see
this revision anyway :-))

Changes since 3.23:

1. The -V mode was added.

2. Altos doesn't like the '@' in filenames. The filename format
was changed. Thanks to [email protected]

Changes since 3.24:

1. Man pages were revised by [email protected] (Gordon Moffet). Thanks.

2. When -L was specified, the "Starting ..." message was not
produced on standard error (with or without -v).

3. When using -X, the 'not for net' warning was printed on standard
output rather thsn standard error.

4. [email protected] reccommends adding -F 5000 to the load
line of unshar when using on XENIX 286 to avoid stack overflow
core dumps. I added this information to an excellkent remake
of the Makefile by [email protected]

Changes since 3.25:

1. Fixed one minor bug with -a/-n. The period supplied when a
slash appears in the -n name was omitted. This is a hatefully
small bug to fix and reissue a whole release, but
a) several new names are on the sharlist now and they have
only 3.24 to work with,
b) this will surely sync us all up, and
c) I think it will put shar to bed for a while ("no known bugs
at this ti ... bus error core dumped").

Changes since 3.27:

1. The unshar-time test for a touch -m facility now greps for
'mmdd', not '[-amc]', making it more universally successful.

2. NOTE: there is still a problem with -n arguments using
a 'x/y' construct, but I don't know how to properly generalize
it so you'll have to edit shars made with some uses of -a
with -n x/y.

3. This is surely my last work on this. It does everything
I needed and more. Thanks for all the help and suggestions.
It seems as though we didn't precipitate 'death of the shar'
after all ๐Ÿ™‚ ๐Ÿ™‚ :-).

---------------------------------------------------------------------
Warren Tucker, TuckerWare emory!n4hgf!wht or [email protected]
{gatech,emory,tridom,kd4nc}!n4hgf!wht (404)587-5766
wht%[email protected]
SHAR Version 3.32

This archive contains shell archive utilities for LINUX.
Also included is the generic source code for any Unix system.

shar binary for LINUX
unshar binary for LINUX
shar.1 man page for shar
unshar.1 man page for unshar
readme description and history
readme.1st this file.
shar332.tar source code to shar in tar format, this is generic source
code which can be used on many Unix systems.

Put the shar and unshar binaries in /bin. Don't forget to use LINUX's
chown and chmod commands to set proper ownership and permissions.


 December 13, 2017  Add comments

Leave a Reply