Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Is this possible/easy?



I haven't used this for a while, but I happened to have it sitting around
in my FPATH, named pingall ...

for i in $(sed 's/#.*//' < /etc/hosts | awk '{print $2}')
do 
    echo "Trying $i ... " 
    case $HOSTTYPE in
    hp9000*) /etc/ping $i -n 3 ;;
    sun4) /usr/etc/ping $i 56 3 ;;
    *) ping -c 3 $i ;;
    esac 2> /dev/null
    echo '=============================' 
done

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern



Messages sorted by: Reverse Date, Date, Thread, Author