remote wall shell script

David Barto barto at celerity.UUCP
Sat Jan 19 06:47:36 AEST 1985


#! /bin/sh
# this is a shell script that will run 'wall' on all hosts
# listed in your /etc/hosts file
# 4.2 BSD of course, SysV has no remote hosts.....
echo "Enter message lines followed by a ^D"
echo -n ">> "
unique=/tmp/rwall$$
/bin/cat > unique
hostlist=`/bin/awk '$1!="#" {print $2}' /etc/hosts`
for hostname in $hostlist
do
	/usr/ucb/rsh $hostname /bin/wall < unique&
done
/bin/rm -f unique
-- 
David Barto		      akgua!celerity!barto
{decvax || ucbvax || ihnp4}!sdcsvax!celerity!barto
"If you are using more than 10 sites to get here, you are taking the long way"



More information about the Comp.sources.unix mailing list