Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ncoast.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!mhuxl!ulysses!allegra!mit-eddie!genrad!decvax!cwruecmp!atvax!ncoast!bsa From: bsa@ncoast.UUCP (The WITNESS) Newsgroups: net.sources Subject: Re: Preparing Files for Extraction Message-ID: <309@ncoast.UUCP> Date: Fri, 7-Sep-84 14:02:37 EDT Article-I.D.: ncoast.309 Posted: Fri Sep 7 14:02:37 1984 Date-Received: Thu, 13-Sep-84 08:26:25 EDT References: <1755@uw-june> Organization: North Coast XENIX, Cleveland Lines: 39 [gollum :-)] > From: rose@uw-june.UUCP > Files submitted to net.sources are prepared for submission in such a fashion > that they may be simply extracted using sh. How is this done? It can be done fairly easily. I have the following shell script, not great but it works: ============================================================ : shar - shell script maker for "archiving" FTP on net.sources if [ $# -eq 0 ] then echo "usage: shar file1 file2 ..." exit 1 elif [ $# -eq 1 ] then echo "usage: shar file1 file2 ..." exit 1 fi FILE=/tmp/shar$$ echo 'Output will be in shar.out' >$FILE for file do if [ ! -r $file ] then echo "shar: $file cannot be read" >&2 continue fi echo "shar - `basename $file`" echo "echo 'sh - `basename $file`'" >>$FILE echo "sed 's/^X//' <<'________This_Is_The_END________' >>`basename $file`" >>$FILE sed 's/^/X/' <$file >>$FILE echo '________This_Is_The_END________' >>$FILE done mv $FILE shar.out || echo "shar: could not make shar.out: output is in $FILE" >&2 ============================================================ It could be simplified a little, but our 'test' is stupid and chokes on -a and -o (AND and OR). --bsa