Hi ,
I m getting an error after executing the script.
My script.
Script is used to find out the date on 8 different machines(mentioned in SERVERNAMES file).
I have added public key to avoid ssh password and ssh without password working fine.
#!/bin/sh
fn_VMFind()
{
Date=`ssh -t -t -q root@$1 date`
echo $Date
}
while read line
do
fn_VMFind "$line"
done < SERVERNAMES
There are total 8 Server IP addresses mentioned in SERVERNAMES file.
output:
tcgetattr: Inappropriate ioctl for device
Thu Jul 8 13:59:13 IST 2010
It shows Date on Only first server.
What can be the issue?
work great but how would i do something like this.
I have done many permutation combination but nothing helped. please suggest.
xm list is a command in Oracle virtual environment and displays name of the machines running under it.
i just want to count the number of lines and assign them to a variable.