Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!ut-sally!ut-ngp!auscso!johnk From: johnk@auscso.UUCP (John Knutson) Newsgroups: comp.lang.pascal Subject: Re: Re shar request Message-ID: <536@auscso.UUCP> Date: Sun, 18-Oct-87 22:38:02 EDT Article-I.D.: auscso.536 Posted: Sun Oct 18 22:38:02 1987 Date-Received: Mon, 19-Oct-87 03:34:40 EDT References: <9841@brl-adm.ARPA> Reply-To: johnk@auscso.UUCP (John Knutson) Organization: Austin UNIX Users' Group, Austin, TX Lines: 37 the following is a shell shar maker. just do a shar files >shar.file, and that's it. it isn't in a shar archive. BTW: i already mailed this shar to him. --cut-here-- echo "#! /bin/sh" echo "# This is a shell archive, meaning:" echo "# 1. Remove everything above the #! /bin/sh line." echo "# 2. Save the resulting test in a file" echo "# 3. Execute the file with /bin/sh (not csh) to create the files:" echo "#" for file in $* do echo "#\t\t$file" done echo "#" echo "# Created by $LOGNAME (`grep $LOGNAME /etc/passwd | cut -f5 -d:`) \c" echo "on `date`" echo "#" for file in $* do echo "if test -f '$file'\nthen" echo "\techo shar: will not over-write existing file \"'$file'\"\nelse" echo "echo extracting \"'$file'\"" echo "sed 's/^X//' >$file <<'SHAR_EOF'" awk '{ printf "X%s\n", $0 }' $file echo "SHAR_EOF" count=`wc -c $file | cut -c-7 | tr -d " "` echo "if test $count -ne \"\`wc -c < '$file'\`\"\nthen" echo "\techo shar: error transmitting \"'$file'\" '(should have been $count characters)'" echo "fi\nfi" done echo "# end of shell archive" echo "exit 0" -- John Knutson {ihnp4,allegra,ut-sally}!ut-ngp!auscso!johnk Living is easy with eyes closed, misunderstanding all you see Communicating, like in the good ol' days.