Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expect scrits exits before excuting without interact

Status
Not open for further replies.

madhavbhamidipati

Programmer
Jan 21, 2015
2
Hi

I see the following behaviour for the piece of code given below:



:
:
set def_router_cmd {def_router=`route -n | grep ^0.0.0.0|awk '{print \$2}'`}
set pingcmd {ping -c 3 $def_router}

send "$def_router_cmd\r"
send "$pingcmd \r"
puts "The output is '$expect_out(buffer)'."
#interact


Now output is nothing as commented out 'interact'

Can anybody tell why it is not executing the commands?

regards,
Madhav
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top