#! /bin/sh

# execute a command on all "pingable" hosts
# list of pingable hosts is determined by all_hosts
# /etc/hosts.equiv should enable remove logins without password
#
# (c) Thomas Lange; 2000-2001, Institut fuer Informatik, Uni Koeln

if [ -z "$1" ]; then
    echo "Missing command"
    exit
fi

# use dsh in the future

hosts=`all_hosts`
for h in $hosts; do
         echo ''
         echo ''
         echo '*****   '$h'   *****'
	 rsh $h "$@"
done
