[comp.sources.misc] unshar script

allbery@ncoast.UUCP (05/19/87)

Here's a very simple unshar script I thought I would share with
the rest for the world. In it's present form, it is a Korn shell
function, but can be modified *very* easily into a regular shell
script by deleting the first two and last one line.

#-cut-
function unshar
{
	if [ -z "$1" ]
	then
		sed -e '1,/^[:#]/d' | sh
	else
		for file in $*
		do
			echo "X - $file"
			sed -e '1,/^[:#]/d' $file | sh
		done
	fi
}
#-cut-
-- 
 					Mikel Manitius @ AT&T-IS
 					mikel@codas.att.com.uucp

./