proc pingOneAddress { adr cnt } { set a [exec ping $adr siz 1024 tim 1 rep $cnt] set a [string tolower $a] set b [expr [string first ( $a]+1] set c [expr [string first / $a $b]-1] set a [string range $a $b $c] return $a } pingOneAddress 192.168.1.197 10