shar: a blast from the past

John Gilmore was going through some old backup cartridge tapes. He stumbled on the following email. "shar" was old in 82... I think I actually wrote the script in the email in 78 or 79.

Bits and memes never die.

From decwrl!decvax!microsof!uw-beave!jim Mon Oct 18 11:08:34 1982
Subject: Shell archiver
Newsgroups: net.sources

I see a lot of sources posted here which consist of several files, all
catted together, and then I have to edit the source to extract all the
files.  Here is a simple shell script which will package up a bunch of files
into a "shell archive", which when used as input to a shell, will extract
the constituent files (is that perfectly clear?).  For example, if I want to
distribute a program consisting of files foo1.c, foo2.c, and makefile, I
would type "shar archive foo1.c foo2.c makefile" and I would then post
"archive" to the net.  Recipients would then run the archive into their
shell and would get back the original files.  Here it is:

# shar -- Shell archiver
AR=$1
shift
for i do
	echo a - $i
	echo "echo x - $i" >>$AR
	echo "cat >$i <<'!Funky!Stuff!'" >>$AR
	cat $i >>$AR
	echo "!Funky!Stuff!" >>$AR
done

Thanks to James Gosling at CMU for this idea.
Comments:

Nice - since I was only born a few years later, the closest thing I can get to when I have acquired my abilities is to write an archiver in JavaScript.

Basically the problem at hand was to create a rich media web site for my school (all animations coded in JavaScript since GIF graphics has only 256 colours maximum), and obviously Flash wasn't a viable option yet.

The good old trick of preloading images obviously helps, but with the bandwidth of the time even loading HTML pages takes time, and that would be user seeing choppy animation or blank slides etc.

So the solution - a single HTML "archive" that would be unpacked into all the "pages" we have once arrived onto the client machine (LZW was used initially; then we've switched to arithmetic coding).

Posted by Alex Lam on March 03, 2006 at 09:39 AM PST #

Post a Comment:
Comments are closed for this entry.
About

jag

Search

Archives
« September 2015
SunMonTueWedThuFriSat
  
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
   
       
Today