On Thu, 2007-10-04 at 11:53 +0200, Marijn Schouten (hkBst) wrote:
> > See, another use of bash arrays just because you can?
> > IFS=-
> > set -- ${CHOST}
> > spec=$2
> > 
> > Works fine in bash - and other shells.
> 
> Do I understand correctly that this resets any arguments that might have been
> passed to the function this happens to be in?

Yes it does.

Most people write their functions like so

foo() {
    local this=$1 that=$2

And then use $this and $that for greater clarity. So if they do that
then resetting the positional parameters is a non issue as they've
already been saved.

Thanks

Roy

-- 
[EMAIL PROTECTED] mailing list

Reply via email to