linux - Bash script error with exponent expression -
i'm writting script outer loop , 2 inner loop, must not correctly typing out syntax want write look first inner loop raise $2 powerfulness of j + 1: $2^(j+1)
this not finish script:
for((d=0;d<=($2**($j+1));d++)) <---- done
what proper way write such look in loop?
you try
for((d=0;d<=$(($2**($j+1)));d++)) <----
$
sign , double ((
around expression.
depends bit on bash
version using. don't need $
...
linux bash
No comments:
Post a Comment