Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-crg!ames!ucbcad!ucbvax!sdcsvax!hutch
From: hutch@sdcsvax.UCSD.EDU (Jim Hutchison)
Newsgroups: comp.sys.amiga
Subject: Re: Pattern Matching & documentation
Message-ID: <2306@sdcsvax.UCSD.EDU>
Date: Tue, 16-Dec-86 13:45:42 EST
Article-I.D.: sdcsvax.2306
Posted: Tue Dec 16 13:45:42 1986
Date-Received: Wed, 17-Dec-86 19:07:40 EST
References: <1908@jade.BERKELEY.EDU>
Reply-To: hutch@sdcsvax.UUCP (Jim Hutchison)
Organization: UCSD EMU Project (Educational Microcomputer Unix)
Lines: 29

In article <1908@jade.BERKELEY.EDU> mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) writes:
>Consider a shell script:
>
>	for i in $*
>	do
>		echo $i
>	done
>
>which acts like echo, but puts each word on a seperate line. Now, try
>convincing it to echo a "*". Notice that your quoting mechanisms don't
>work right.
consider this perhaps instead (sorry)...

#! /bin/sh
for i in $@
do
	echo $i
done

$@ is "$1" "$2" ...
$* is  $1   $2  ...

this is just another important piece in the quoting mechanism, which is
a detail that can not be left out.
-
-- 
    Jim Hutchison   		UUCP:	{dcdwest,ucbvax}!sdcsvax!hutch
		    		ARPA:	Hutch@sdcsvax.ucsd.edu
Fig is a 5 stage concept.