[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is bash dying or dead (was Re: 4.1 is "$((( ))) an 'official operato
Re: Is bash dying or dead (was Re: 4.1 is "$((( ))) an 'official operator, if $(( )) isn't?
Wed, 10 Aug 2011 17:57:23 -0700
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:126.96.36.199) Gecko/20100228 Thunderbird/188.8.131.52 Mnenhy/0.7.6.666
Chet Ramey wrote:
Is this a fluke, due to the above changes NOT being 4.1? Or is
this construction going to break in 4.2:
What does `break' mean? It's already written in a manner more
confusing and obscure than necessary. What value do you think the
extra set of parens adds?
I thought the $( ) was necessary to make the inner (()) an arithmetic
expression... Does it execute in a sub process?
I wanted to evaluate something and assign result to a var.
so: a=$(((-48-16+2**6))) gives me 'a=0', but
And it does in bash-4.2 also, but why make things harder on yourself?
If you feel you have to use a redundant set of parens, make the intent
of the code clear:
a=$(( (-48-16+2**6) ))
Well, that works!, but I thought the posix page pointed at above said
somthing about putting a space betweent the outward 2 parens.
Well, if that's the correct form, I have no problem using
it...just that things that used to work are not...and the manpages
aren't that explanatory nor do they have much in the way of
examples....I DO pour over them on an almost daily basis!