From: gabriel borrageiro (gborrageiro@hotmail.com)
Date: Mon May 09 2005 - 08:59:33 EDT
hello,
I am trying to run a simple script that would log into the host specified in
a file called list, then run a few commands to collect the information.
What am I doing wrong or how would you do this better?
thank you!
########################################
#!/usr/bin/bash
for i in `cat /var/tmp/list`
do echo $i
done
cat <<eof | ssh2 $i
uname -a
ifconfig -a
eof
########################################
It seems it initially echos each line in 'list', but then proceeds to ssh
only to the last entry in 'list' and does not seem to execute commands after
ssh.
best regards,
Gabriel
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:40 EDT