Path: utzoo!mnetor!uunet!pcrat!rick From: rick@pcrat.UUCP (Rick Richardson) Newsgroups: comp.sources.d Subject: Re: Suggestion for shar file posting Message-ID: <450@pcrat.UUCP> Date: 27 Jan 88 14:20:04 GMT References: <661@silver.bacs.indiana.edu> <2127@tekred.TEK.COM> Reply-To: rick@pcrat.UUCP (Rick Richardson) Distribution: na Organization: PC Research, Inc., Tinton Falls, NJ Lines: 52 If you can't get Rich's unshar, this shell will suffice. Just |unshar or, more likely: |unshar -d /tmp/newgame #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # unshar # This archive created: Wed Jan 27 09:16:08 1988 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'unshar' then echo shar: "will not over-write existing file 'unshar'" else cat << \SHAR_EOF > 'unshar' files= dir=. while [ $# != 0 ] do case $1 in -d) shift; dir=$1;; *) files="$files $1";; esac shift done if [ "Q$dir" != Q. ] then mkdir $dir fi if [ "Q$files" = Q ] then sed '1,/^[#:]/d' | (\cd $dir; sh) else for i in $files do echo $i sed '1,/^[#:]/d' <$i | (\cd $dir; sh) done fi SHAR_EOF fi exit 0 # End of shell archive -- Rick Richardson, President, PC Research, Inc. (201) 542-3734 (voice, nights) OR (201) 834-1378 (voice, days) uunet!pcrat!rick