Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!batcomputer!itsgw!steinmetz!ge-dab!codas!ateng!chip From: chip@ateng.UUCP (Chip Salzenberg) Newsgroups: comp.sources.d Subject: Re: File headers on shar files Message-ID: <118@ateng.UUCP> Date: Fri, 4-Dec-87 10:58:38 EST Article-I.D.: ateng.118 Posted: Fri Dec 4 10:58:38 1987 Date-Received: Wed, 9-Dec-87 23:43:06 EST References: <393@ddsw1.UUCP> Reply-To: chip@ateng.UUCP (Chip Salzenberg) Organization: A T Engineering, Tampa, FL Lines: 39 Keywords: headers, comp.sources, source postings, shars In article <393@ddsw1.UUCP> karl@ddsw1.UUCP (Karl Denninger) writes: > >First, the map files had no headers on them beyond the normal Usenet >headers. [...] > >Now, the significance of this is that I can easily feed this article, sans >headers, to 'sh' for immediate unpacking. It's easy to unshar any sharchive article -- even one with leading text -- with the following script: -----------8<----cut here-----8<---------- : unshar # Extract modules from a shar archive SEDCMD="1,/^[#:]/d" case $# in 0) sed -e $SEDCMD | sh ;; *) for f do sed -e $SEDCMD $f | sh done ;; esac -----------8<----cut here-----8<---------- In rn, just type `|unshar' and you're in business. (Unless the poster had the bad manners to put a line starting with # or : before the sharchive.) -- Chip Salzenberg "chip@ateng.UUCP" or "{codas,uunet}!ateng!chip" A T Engineering My employer's opinions are not mine, but these are. "Gentlemen, your work today has been outstanding. I intend to recommend you all for promotion -- in whatever fleet we end up serving." - JTK