Below is my script
proc sendline {line} { send -- "$line\r" }
set slot 1
set port 1
for {set x 0} {$x<48} {incr x} {
sendline {curl -X POST -d '{"command":"dumpcommand","slot": "$slot","port": "$port"}' http://127.0.0.1:7777/api/test}
expect -exact "OK"
sleep 2
incr slot
incr port
}
I want slot and port to be replaced with 1 ,2 ....e.g
curl -X POST -d '{"command":"dumpcommand","slot": "1","port": "1"}' http://127.0.0.1:7777/api/test