Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

Re: Diagnosing "helper app spawn" errors with Netscape 4

Curt Sampson (cjs@portal.ca)
Tue, 24 Mar 1998 10:33:48 -0800 (PST)

On Tue, 24 Mar 1998, Ted Powell wrote:

> Instead of the rather ugly
>
> a=`expr $a + 1`
>
> you can do
>
> ((a+=1))

Of course, I find a=$(($a+1)) to be about as neat.

> Note that shell variables inside either ((...)) or $((...)) don't need a
> dollar sign.

Actually, it's probably safer to put it in there, however, as some
modern shells (such as ash, which is used as a replacement for
`standard' /bin/sh, and I think the Single Unix Specification sh)
don't support the syntax without a dollar sign before the variable.
Does anyone know what POSIX (in particular, IEEE 1003.2b) says
about this?

cjs

Curt Sampson cjs@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc. Through infinite mist, software reverberates
Vancouver, BC (604) 257-9400 In code possess'd of invisible folly.