
# sharks - SHell ARchive checK Script (N.B., Bourne shell)
#
# The "shar" utility is really a neat hack, but it scares me silly
# from a security perspective.  I DON'T LIKE giving my session over
# to someone else's script, despite the fact that I can take a few
# precautions.  Scanning a shar file for gotchas is impractical,
# since it takes too much time, and one can still miss things.
# Besides, there is even a nifty gotcha I saw that causes vi to
# perform commands while reading in a file(!)
#
# So, I wrote this piece of paranoid code to help me scan shar files
# in a reasonably efficient manner.  It throws away all the here
# document text (using a somewhat naive algorithm), then throws away
# command lines it (quite conservatively) thinks are safe.  The rest
# of the text goes to standard output, for storage and/or perusal.
#
# I'm sure it isn't foolproof.  (It doesn't even TRY to look at the
# code that is being unpacked...)  Still, the resulting output is
# short and sweet, and it tells me everything I want to know before
# submitting my session to the file...
#
# Usage:  sharks foo bar ...
#
# Copyright (C) 1986, Richard Morin.  All Rights Reserved.
#
# Use it (at your own risk, of course), but don't sell it.  Also,
# please let me know about any problems and/or improvements you find.
#
# Richard Morin, proprietor	{hoptoad,leadsv,lll-lcc}!cfcl!rdm
# Canta Forda Computer Lab.	+1 415 994 6860
# Post Office Box 1488		Full spectrum consulting services
# Pacifica, CA  94044  USA	for science and engineering.
#
# P.S. Long live awk, sed, and sh ! ! !

