On Sat, Jun 15, 2002 at 01:00:24AM +1000, Matthew Hannigan wrote:
> >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.
>
> I would hope so, but I'm fairly sure I've tried it
> on recent HP-UX and Solaris machines and it needed
> the ${1+"$@"} trick.
As an aside, if you want to do truly portable shell programming
which works on almost every system under the sun, check out the
GNU autoconf manual. Chapter 10 is a solid 20 pages or so on how
to write portable shell, and it's short and to-the-point.
If you spend a lot of time having to deal with evil portable
shell scripting, then reading that chapter will save you from
a lot of painstaking research.
--
#ozone/algorithm <[EMAIL PROTECTED]> - trust.in.love.to.save
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug