Annihilannic
MIS
Hi,
Anyone know why the following script works as expected when simply echoing the 'rsh' command line, but stops after the first host in the list when the rsh is actually executed?
[tt]------------------------------- 8< ------------------------
#!/usr/bin/ksh
DEBUG_ECHO=echo
do_uptime ()
{
while read line
do
echo "$line: \c"
${DEBUG_ECHO} rsh $line uptime
done
}
do_uptime << HERE
hosta
hostb
hostc
HERE
------------------------------- 8< ------------------------[/tt]
Any help greatly appreciated.
Annihilannic.
Anyone know why the following script works as expected when simply echoing the 'rsh' command line, but stops after the first host in the list when the rsh is actually executed?
[tt]------------------------------- 8< ------------------------
#!/usr/bin/ksh
DEBUG_ECHO=echo
do_uptime ()
{
while read line
do
echo "$line: \c"
${DEBUG_ECHO} rsh $line uptime
done
}
do_uptime << HERE
hosta
hostb
hostc
HERE
------------------------------- 8< ------------------------[/tt]
Any help greatly appreciated.
Annihilannic.