I need to rsh to many machines and run an " if statement' that checks the versions of the OS and if up to date it tee -a to a file called "uptodate"..then if not update, it tee -a to file called "notuptodate" on my machine
the command that checks the version is cat /etc/version.
now the output of that is the one I am looking to have the if statement test against.
I am just having issues with setting up that if statement
This is part of it..( variable are already set up )
for host in `cat $SUN`
do
rsh $host "( /usr/bin/cat /etc/version)"
*problem starts here
if [$? = 5.8]; then
echo $host | tee -a $uptodate
else
echo $host | tee -a $notuptodate
fi
done
Your help would be appreciated