madhavbhamidipati
Programmer
- Jan 21, 2015
- 2
I wanted to set variables with a command to be executed on server.
is it possible something like below?
set def_router_cmd 'def_router=`route -n | grep ^0.0.0.0|awk '{print $2}'`'
set ping_cmd="ping -c 3 $def_router"
send $def_router_cmd\r
send $ping_cmd\r
tcl is interpreting $ which is meant for remote bash and throwing errors, need help on this...
Or I need to get the output process it locally?
is it possible something like below?
set def_router_cmd 'def_router=`route -n | grep ^0.0.0.0|awk '{print $2}'`'
set ping_cmd="ping -c 3 $def_router"
send $def_router_cmd\r
send $ping_cmd\r
tcl is interpreting $ which is meant for remote bash and throwing errors, need help on this...
Or I need to get the output process it locally?