Posted to tcl by Napier at Sat Feb 28 01:33:20 GMT 2015view pretty

proc RunPing {} {
			set fh [open "|ping www.google.com" r]
			after 2000
			exec kill -INT [pid $fh]
			after 2000
			set test [lrange [split [read -nonewline $fh] \n] end-1 end]
			puts $test
}