On 2006-08-22, at 09:11:06, Russell McGaha wrote: > Folks; > I've got a situation where I running a script and need to wait > till the output of a command is null: > > ex. > NotNull = true > While NotNull > do > fmsadmin status Clients #[returns a list of connected clients; > I'd like to got thru > this loop until either the output of the command is null or > About 2-5 minutes have gone by]# > done You should be able to adapt the following for your purposes. The example runs for 18 seconds and pauses for 1 second in between 'ping' calls. The time required for the 'fmsadmin' call may actually need a larger pause depending on network conditions #!/bin/sh # Copyright © 2003, Philip Aker <[log in to unmask] \ exec tclsh "$0" "$@" set tstart [clock seconds]; set tend [expr $tstart + 18]; while {[expr [clock seconds] < $tend]} { #set result [exec fmsadmin status Clients]; set result [exec ping -c 1 www.apple.com] if {[string length $result] > 0} { puts $result; set result "" } else { break; } after 1000; if {[clock seconds] == $tend} { break; } } puts "\n################# THE SCRIPT IS FINISHED #################" Philip Aker [log in to unmask]