I want the following command to execute 100 times in for loop
cleos push action bescouted registeracc '[$RANDOM]' -p bescouted
cleos push action bescouted vote '[0,$i]' -p bescouted
With variables "$RANDOM" and "$i" showing their real values, but now commands in single quotes are counted as strings. How can I make commands in single quotes execute as written with showed variables instead as strings?
My current script:
#!/bin/sh
cleos push action bescouted posting '[0,"a"]' -p bescouted
for i in {1..100}
do
cleos push action bescouted registeracc '[$RANDOM]' -p bescouted
cleos push action bescouted vote '[0,$i]' -p bescouted
done
current output:
cleos push action bescouted registeracc [$RANDOM] -p bescouted
cleos push action bescouted vote [0,$i] -p bescouted