>Interested in the behaviour I tried that with my version (Version JM 93t+
>2010-03-05( and it gives the same result.
>Moreover I noticed that in
>
>integer b=$((2**32)) ; for ((i=0;i<=97;i++)) ; do printf "%5d\t%12d\n" $i
>$(( b >> i )) ; done
>typeset -i b=$((2**32)) ; for ((i=0;i<=97;i++)) ; do printf "%5d\t%12d\n" $i
>$(( b >> i )) ; done
>
>the first command produce the same result that you showed, while the second
>one produces only zeroes.
>Moreover, if I run the second command first (and get the zeroes), then run the
>first command I get also zeroes, and if I rund the second >command a second
>time it produces the result you observed.
Sorry, I meant if I run the _first_ command a second time:
$ typeset -i b=$((2**32)) ; for ((i=31;i<=33;i++)) ; do printf "%5d\t%12d\n" $i
$(( b >> i )) ; done
31 0
32 0
33 0
$ integer b=$((2**32)) ; for ((i=31;i<=33;i++)) ; do printf "%5d\t%12d\n" $i
$(( b >> i )) ; done
31 0
32 0
33 0
$ integer b=$((2**32)) ; for ((i=31;i<=33;i++)) ; do printf "%5d\t%12d\n" $i
$(( b >> i )) ; done
31 2
32 1
33 0
>So there even seems to be a dependency to some internal shell state.
>
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users