Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site uw-beaver
Path: utzoo!linus!philabs!seismo!harpo!floyd!vax135!cornell!uw-beaver!jim
From: jim@uw-beaver.UUCP
Newsgroups: net.followup
Subject: Re: !FUNKY!STUFF!
Message-ID: <692@uw-beaver>
Date: Wed, 29-Jun-83 18:52:38 EDT
Article-I.D.: uw-beave.692
Posted: Wed Jun 29 18:52:38 1983
Date-Received: Thu, 30-Jun-83 12:51:11 EDT
References: cca.5035 <1680@yale-com.UUCP>
Organization: U of Washington Computer Science
Lines: 23

I have risen to the challenge, and created a version of shar which I
think solves the problem of the magic word appearing in the text of
archived files, for example when archiving archives.  The magic word is
generated by combining the node name with the date and time of day,
producing an identifier that is unique for all time.  Portablility
suffers somewhat, because not all Unixes have the "uuname -l" command
(which just returns your own system name).

Here it is:

MAGIC=`(uuname -l; date) | tr ' :\12' '_--'`
AR=$1

shift
echo "# The rest of this file is a shell script which will extract:" >>$AR
echo "# $*" >>$AR
for i do
	echo a - $i
	echo "echo x - $i" >>$AR
	echo "cat >$i <<'$MAGIC'" >>$AR
	cat $i >>$AR
	echo "$MAGIC" >>$AR
done