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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expect printing string twice

Status
Not open for further replies.

NetworkGhost

IS-IT--Management
Apr 12, 2005
1,324
US
I have a line in my expect script:

expect "Success*ms" {set ICMPLINE [string trimright $expect_out(0,string)] ; send_log "$ICMPLINE\n"}

It is getting printed rwice in the log like so:

Success rate is 100 percent (5/5), round-trip min/avg/max = 88/91/92 ms
Ciscorouter#Success rate is 100 percent (5/5), round-trip min/avg/max = 88/91/92 ms

I would like to Only print this line:

Success rate is 100 percent (5/5), round-trip min/avg/max = 88/91/92 ms

Any help would be appreciated. Not sure why it puts the line out twice.



Free Firewall/Network/Systems Support-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top