Warp wrote:
> % echo $[1+2*3]
> 7
>
> % let A=1+2*3
> % echo $A
> 7
>
> You can achieve the same thing in sh using the bc program, but it's more
> heavy and takes more resources (you have to start an external program instead
> of just calculating it inside the shell itself).
In ksh:
echo $((1+2*3))
7
A=$((1+2*3))
echo $A
7
K.K.
Post a reply to this message
|