2 ################################################################################
5 # Description: A script to execute a command on all desktop class machines
6 # Author: Andrew@DeFaria.com
7 # Created: Thu May 11 11:08:24 PDT 2000
11 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
13 ################################################################################
14 # Set me to command name
18 adm_base=${adm_base:-$HOME/adm}
21 adm_fpath=${adm_fpath:-$adm_base/functions}
27 machines=${machines:-$adm_base/data/machines}
29 if [ "$1" = "-f" ]; then
37 if [ "$1" = "-r" ]; then
42 for desktop_machine in $(grep -ve ^# $machines | grep :Desktop: | cut -d:
44 # Execute command. Note if no command is given then the effect is to
45 # rlogin to each machine.
46 print "$desktop_machine:$@"
48 if [ -z "$root" ]; then
49 remsh $desktop_machine -n "$@"
51 root remsh $desktop_machine -n "$@"
54 if [ -z "$root" ]; then
55 remsh $desktop_machine
57 root remsh $desktop_machine