开发者

Why can't I assign random values in a loop?

开发者 https://www.devze.com 2023-03-04 04:42 出处:网络
I want to implement the following: for (( i=1; i<=sim_users; i++)) do value[$i] = $RANDOM done why dosen开发者_如何学Python\'t this work?You want

I want to implement the following:

for (( i=1; i<=sim_users; i++))
do
   value[$i] = $RANDOM
done

why dosen开发者_如何学Python't this work?


You want

value[$i]=$RANDOM

You can't put a space before or after the equals sign.

0

精彩评论

暂无评论...
验证码 换一张
取 消