[comp.sys.amiga] PD/Shareware list decoding

kjohn@richsun.UUCP (John Kjellman) (10/11/88)

			******** NOTE *******
Below is a review of how to unpack a compressed/uuencoded/shared USENET
archive.  If you already know how to do this, hit N now!!!!
			******** NOTE *******
Also, Part 2 is being re-posted (to comp.sys.amiga ONLY) due to more
requests than I care to mention :-).
			******** NOTE *******

	To all who sent me mail (there are a lot of you out there :-) that
couldn't seem to get fish.uc to uudecode I have a message for you:

Sam Kinison (sp?) mode on: ;-)

WAKE UP !!! (just kidding ;-)  SMELL THE COFFE :-)  AAAA AAAA AAAGGGGGHHHH!!!

Sam Kinison mode off: ;-)

OK, now that I've gotten that out of my system, let me give you a brief
tutorial on USENET shar files .......

On USENET, most people use the 'shar' program to create a single file that
can later be broken up into the original files using 'sh'.  Now since these
files *most* be ASCII text, if you have a binary file you must use the
'uuencode' program to create an ASCII text version of your binary file.

The steps I went through looked like the following:

1) I had 6 text files I wanted to send out: fish1-154.list, amicus1-26.list,
usenet.list, kjohn.list, innock.list, and vi.list.

2) Since these files totaled over 1/4 meg, I decided that I should compress
them (to conserve net bandwidth :-).  To do this I used the 'compress'
program:
	compress fish1-154

3) Next since I now had all binary files, I had to 'uuencode' them to make
them text files again (on larger text files this usually results in some
space savings, even though the 'uuencode'ing increase the files size by
~20%):
	uuencode fish1-154.Z fish1-154.Z >fish.uu

This syntax works as follows:  the first file name is the name of the file
to be 'uuencode'ed, the second file name is the name of the file that will
be created when the output of this program is 'uudecode'ed.  The last
filename is the output of 'uuencode' re-directed to a file that we can
'shar' up later.

4) Next, since I like to keep my posting from 30K to 37K, I broke up
fish.uu into five parts: fish.ua, fish.ub, fish.uc, fish.ud, and fish.ue.
Note that this is *standard* USENET practice when send large files, because
some news spools cannot handle files much over 32K :-) .......

5) Now I 'shar'ed my fish files with my other files ('compress'ed and
'uuencode'ed just like the fish stuff) into 5 files for posting.

6) I posted wach of the five files over a five day period to keep down the
traffic (some systems have very tiny news spool directories :-).

Now, on your end you sould have recieved 5 posting, let's call them post1,
post2, post3, post4, and post5 (how creative :-).  Here's what you need to
do to get back the original text files:

1) Using your favorite editor, delete from the first line up to and
including the line that says "cut here" from each file.

2) Now you must "unshar" each file.  You do so like this:

	unshar post1

3) When this is done to all five files, you should end up with the
following files:

	From Part 1:
a)	fish.ua
b)	innock.list.Z.uu
c)	kjohn.list.Z.uu
d)	usenet.list.Z.uu
e)	vi.list.Z.uu

	From Part 2:
f)	amicus1-26.Z.uu
g)	fish.ub

	From Part 3:
h)	fish.uc

	From Part 4:
i)	fish.ud

	From Part 5:
j)	fish.ue

4) All the files ending in ".uu" should be run through "uudecode" as
follows:
	uudecode amicus1-26.Z.uu

This will produce a file called "amicus1-26.Z".  (note, this is not a zoo
file, but a "compress"ed file :-)

5) OK, now let's tackle the biggest source of confusion, the fish files.
These files are the orignal "fish.uu" broken up, so all you need to do is
append them together like so:

	cat fish.ua fish.ub fish.uc fish.uc fish.ud fish.ue >fish.uu

Then you must "uudecode" "fish.uu" like before:

	uudecode fish.uu

This should produce a file called "fish1-154.list.Z".  

6) Now we do the final step, creating the final text files.  This is done
using the "uncompress" program.  It is used as follows:

	uncompress fish1-154.Z
	uncompress amicus1-26.list.Z
	uncompress usenet.list.Z
	uncompress kjohn.list.Z
	uncompress innock.list.Z
	uncompress vi.list.Z

NOTE, if your file system truncates any of the file names, you must rename
them to a file that ends in ".Z".  The "uncompress" program expects this
and may refuse (at least mine does :-) to do the decompression without that
postfix.  The Amiga version of "uncompress" does not have this restriction,
although (since I used a 16 bit compression) it requires at least a meg of
memory to decompress the files.


Now we should have our desired result, the PD/Shareware listings.  The
files should be:

	1)  fish1-154.list
	2)  amicus1-26.list
	3)  usenet.list
	4)  kjohn.list
	5)  innock.list
	6)  vi.list

OK, there you have it, a tutorial on USNET "shar" archives and how to get
the PD/Shareware listing from my postings.  I hope you all enjoyed
this.....



						KJohn

P.S.
	If you missed any of the five part, let me know and I'll EMail them
to you.

P.P.S. (here we go again :-)

	If you have trouble doing the above steps (numb fingers (my case
:-), lack of a *real* UNIX system, or whatever)  send me a blank disk along
with a mailer (with sufficent postage attached :-) and I will send you the
complete set of lists.  Please *DO NOT* send me noname/generic disks as I
have had trouble with these before (like excessive deposits on my drive
heads :-), although I *GREATLY* prefer SONY disk, BASF (I know they suck
according to <CB>, but what the hey, this *is* America :-) :-) :-),
Memorex, TDK, JVC, Maxell, 3M, or Verbatim (i.e. Bonus disks) should be OK
too.  Sorry if this sounds picky, but that's the way I am ("I am what I am
and I am no more."  Popeye :-).
-- 
| Amiga ///   | Disclaimer: This is only a dream, it's only a dream ......... |
| Manic///.5K | One liners: I'm from the government, I'm here to help........ |
|  \\\///  1K |             MS/D*S is the best damn OS I have ever used...... |
|   \XX/   2K | kjohn@richsun or [ purdue | spl1 | mcdchg ] ! richsun ! kjohn |

kvancamp@ardec.arpa (Ken Van Camp) (10/14/88)

There is an error in John Kjellman's latest posting of Part 1 of his PD/
Shareware posting.  The part of the shar file that unpacks the usenet
list looks like this:

if test -f 'usenet.list.Z.uu'
then
	echo shar: will not over-write existing file "'usenet.list.Z.uu'"
else
cat << \SHAR_EOF > 'usenet.list.Z.uu'
begin 644 usenet.list.Z.uu

which creates a file called 'usenet.list.Z.uu' in the unshar.  Unfortuately,
that is the same file name assigned in the first line of the uudecode!
So uudecode tries to overwrite the file it is reading, destroying the
original 'usenet.list.Z.uu' file and leaving you with only gibberish.  To
correct this, change the last line above to:

begin 644 usenet.list.Z

Also, John, I like your idea, but in the future you might want to put
your physical mailing address in each of the original ".list" files.
After we've finished stripping off the mail headers and going through
the decoding process (not keeping the originals because we don't have
enough disk space), we look at the list files and realize we no longer
have any ordering information!  I just assumed it was in each file!

                            --Ken Van Camp 
ARPANET:  kvancamp@ARDEC.ARPA   -or-   kvancamp@AC4.PICA.MIL
BITNET:   (use above through normal gateways, like UBVM.CC.BUFFALO.EDU)
USENET:   uunet!ardec.arpa!kvancamp@UUNET.UU.NET

                   "Tis better to Send than to Receive"