I have a space delimited file containing: hostname OracleSID connectstring
I want to loop through the file and execute remsh to check the database processes.
cat $filename | while read HOST SID CONNECT
do
{
result=`remsh $HOST "ps -ef | grep pmon_${SID}$| grep -v grep"`
if ..... then.... fi
}
done
I can execute a variety of commands within the loop, but the second I add the "result=`remsh...`... the loop will only execute 1 time for the first entry in the file. Then it stops. no error, but the loop is done. Please help.