leading comments

ken at boring.UUCP ken at boring.UUCP
Wed Aug 21 02:22:09 AEST 1985


In article <318 at luke.UUCP> itkin at luke.UUCP (Steven List) writes:
>I'd like to suggest that when we put some commentary at the beginning,
>each line be preceded by the shell comment character (#).

This is a repost of a shell script that will solve the problem if every
shar'ed source has a line beginning with # at the top of the archive.
>From rn I just have to say: "| (cd sourcedir; unshar)".

#! /bin/sh
# unshar - pipe shar part of input through sh
# Ignore lines before first "#" comment starting in first column.
# Input is either $1 or stdin.
sed -n '/^#/,$ p' ${1-} | exec sh
-- 
UUCP: ..!{seismo,okstate,garfield,decvax,philabs}!mcvax!ken Voice: Ken!
Mail: Centrum voor Wiskunde en Informatica, Kruislaan 413, 1098 SJ, Amsterdam.



More information about the Comp.sources.unix mailing list