the only thing you have to change for this script to work is the following line: if {[catch {exec ping [lindex $rest 0] -c 3} ping]} { set ping 1 } change set ping 1 to set ping 0 .. and it will work.. this is not the perfect way to build a script.. but it does work.. right now im working with it.. ...