At Fri, 14 Jun 2002 21:43:48 +1000, Matthew Hannigan wrote:
> Angus Lees wrote:
> > as in:  for i in "$@"; do ...; done
> >    or:  exec cmd "$@"
> 
> Yup.  But do you know the magic incantation that
> you have to perform when passing on "$@" to subshells
> that I referred to in my mail?  (only needed for non-Bash
> bourne compatibles)

as far as i can tell, "$@" should do the Right Thing on all POSIX
shells.

for ancient shells, the usual magic incantation is ${1+"$@"}. this is
to make sure it expands to nothing (as in, not even "") when there are
no arguments. "$@" on POSIX shells should do that by itself.

-- 
 - Gus
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to