#! /bin/sh . _setup.sh temp_suffix=tmp-ping-sm-`/bin/date +%Y%m%d-%H%M%S` echo -n "Pinging" for POS in $POS_LIST ; do DCS=`./modules/getdcsbypos.pl $POS`; echo -n "." echo -n $POS "("$DCS"): " > $temp_suffix-$POS ping -c 1 $DCS 2>&1 | head -2 | tail -1 >> $temp_suffix-$POS & done echo "" wait cat $temp_suffix-* rm -f $temp_suffix-*