From: Lew Pitcher on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christophe Gaubert wrote:
> Stachu 'Dozzie' K. a écrit :
>
>> I don't see any such constructions in SUS.
>
>
> What is "SUS" ?

"Single Unix Specification"

The official specification of how a Unix(r) system behaves and what
facilities it offers.

http://www.unix.org/version3/online.html


- --

Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFDHeyLagVFX4UWr64RAucNAKDRzEYVrwwnYknp5rZXfLAni0PK+QCg7M22
LSV0n//CVR8Fp4QeQ97kJrY=
=DAcx
-----END PGP SIGNATURE-----
From: Christophe Gaubert on
Lew Pitcher a écrit :
> "Single Unix Specification"
>
> The official specification of how a Unix(r) system behaves and what
> facilities it offers.
>
> http://www.unix.org/version3/online.html

Thanks :)


--
Christophe Gaubert
http://perso.wanadoo.fr/christophe.gaubert
Mail posté depuis un système libre GNU/Linux
From: Stachu 'Dozzie' K. on
On 06.09.2005, Christophe Gaubert <christophe-gaubert(a)wanadoo.fr> wrote:
> Stachu 'Dozzie' K. a ýcrit :
>> I don't see any such constructions in SUS.
>
> What is "SUS" ?

Single Unix Specification. AFAIK v3 is a POSIX replacement.
http://en.wikipedia.org/wiki/Single_UNIX_Specification
It's freely available at http://www.unix.org/single_unix_specification/
after registration.

--
Feel free to correct my English
Stanislaw Klekot
From: Chris F.A. Johnson on
On 2005-09-06, John Kelly wrote:
> On Tue, 06 Sep 2005 14:14:21 -0400, William Park
><opengeometry(a)yahoo.ca> wrote:
>
>>In standard Bash shell,
>> VAR=$((VAR+1))
>> ((VAR++))
>
> Since others have shown $VAR inside the double parentheses, it's worth
> noting that
>
> VAR=$(($VAR+1))
>
> will work, but
>
> (($VAR++))
>
> will fail. As your example correctly shows, you must use
>
> ((VAR++))
>
> without the $ sign. So for consistency, I tend to omit the $ inside
> double parentheses.

The POSIX arithmetic method is $(( .... )); the variables may or
may not have a $, but must not have it if assignment operatoprs
are used within the parentheses. The parentheses must always be
preceded by the dollar sign to be POSIX compliant.

However, there are otherwise-POSIX-compliant shells which do not
allow variables without the dollar sign. Therefore, I never use it
without them. This means never using assignment operators, and
always have the assignment outside: var=$(( $var + 1 ))

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
==================================================================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/cfaj/ssr.html>
From: Geezer From The Freezer on
Thanks everyone, I tried that a while back but misplaced
the $ inside the brackets.