🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #28280

Re: Shell Archive

#28280
From: Smee
Date: Wed, 16 Sep 1987 10:04
43 lines
2273 bytes
A 'shell archive' (or 'shar file') is simply a U**x command script which will
(if run on a U**x) take itself apart into one or more (usually) files (usually
text files).  These files in turn may be plaintext, uuencoded, uuencoded ARC
files, etc.

If you don't have a handy U**x to take them apart on, they can be (with a bit
of pain) taken apart using a text editor.  Each contained file will be
contained between an invocation of 'sed' (a command-line editor) at top, and
an 'end-of-file' indicator probably followed by an 'if' test at bottom.
Typically, this looks like:

  sed 's/^XX//' << \SHAR_EOF >FRED.UUE
       <Text of included file>
  SHAR_EOF
  if <mutter mutter then else etc...

Ignore the 'if' block if taking them apart by hand.  That's usually a word
or byte-count test to make sure nothing got lost.  The 'sed' line is the
important bit.  Taking it inside out (and noting that the strings in upper
case vary with personal preferences), the:

  \SHAR_EOF

says that the next contained subfile consists of everything after the 'sed'
line, up to (but not including) the line containing only the string SHAR_EOF.
The string:

   >FRED.UUE

(standard redirection) says that this subfile is to be put into a file named
FRED.UUE.  And the construct:

   's/^XX//'

says that when making this file, strip the chars XX from the beginning of each
line.  (Normal editor regular-expression style substitute, really.)  Only
*really* tricky bit is that some folks use a TAB char in that string (where
I've used XX) and TABs sometimes don't survive transmission as such, rather
being turned intosome number of spaces.

Once you've got the bits out of the shell archive, *then* you UUDECODE/un-ARC/
whatever...
Technical Details
Message-ID: <1676@bath63.ux63.bath.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!ukc!dcl-cs!bath63!pes
References: <20118G15@PSUVM>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!ukc!dcl-cs!bath63!pes
From: pes@ux63.bath.ac.uk (Smee)
Newsgroups: comp.sys.atari.st
Subject: Re: Shell Archive
Message-ID: <1676@bath63.ux63.bath.ac.uk>
Date: Wed, 16-Sep-87 06:04:32 EDT
Article-I.D.: bath63.1676
Posted: Wed Sep 16 06:04:32 1987
Date-Received: Sat, 19-Sep-87 18:49:58 EDT
References: <20118G15@PSUVM>
Reply-To: pes@ux63.bath.ac.uk (Smee)
Organization: AUCC c/o University of Bath
Lines: 43