Comments on this program please...

Arthur David Olson ado at elsie.UUCP
Sun Dec 8 07:24:36 AEST 1985


: Some things were not meant to be programmed in C, and this is one of them.
: Followups to this article are being directed to net.unix.
: N.B.  no provision has been made here for occurrences of a slash in word. 

case $# in
	0|1)	echo "`basename $0`: usage is `basename $0` word file ..." 1>&2
		exit 1 ;;
esac

word="$1"

shift

case $#$1 in
	1-)	exec sed "/$word/s//\\
&/g" ;;
	*)	exec sed "/$word/s//\\
&/g" "$@" ;;
esac

--
UNIX is an AT&T Bell Laboratories trademark.
Word is a Microsoft trademark.
--
	UUCP: ..decvax!seismo!elsie!ado    ARPA: elsie!ado at seismo.ARPA
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks



More information about the Comp.lang.c mailing list