source userpass ht=$1 while true do curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"snapshot\",\"coin\":\"KMD\",\"height\":$ht}" #ht=`komodo-cli getinfo | jq .blocks` ht=$(( $ht + 1000 )) echo next height $ht sleep 1 done