Marijn Schouten (hkBst) wrote:
>>
http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp-common.eclass
> 
> You use $* and $@ here which are the same when unquoted. They should
> probably be quoted and that means that all instances would become the four
> characters "$@".
> 
Yeah, that's definitely how to pass thru parameters in function calls.

<greybot> The difference between $@ and $*: without double quotes, none at
all: both equal $1 $2 .... With double quotes, "$@" is "$1" "$2" ...,
while "$*" is "$1c$2c..." (where c is the first character of $IFS). You
almost always want "$@".

So using "$*" maps to one string parameter. If you're calling a shell
function you might not notice the difference (until you use a parameter
with a space) using plain $* since the shell splits parameters to commands
on characters in IFS. The point is, to deal with spaces in strings you need
to use "$@".

#bash is your friend (although some of the ops are way too grumpy ;)


-- 
[EMAIL PROTECTED] mailing list

Reply via email to