Andre Pang wrote:

> 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.

Thanks for the reminder.  I had bought the autoconf, automake
libtool book, and skipped through it.  Just rereading it now
gave me some extra useful information.  Some it makes you want
weep.  Luckily some of the older Unixes would no longer be used
enough to care about.

My favourite non-portable misfeature, which is not mentioned in
that chapter is the fact that HP-UX and some others search the
PATH for 'program' when you invoke 'sh program'.  Apparently that
interpretation is allowed by POSIX.

But I digress :-)


Matt

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

Reply via email to