Thread: Scripting
View Single Post

   
  #1 (permalink)  
Old 04-24-2008, 04:37 PM
invincible
 
Posts: n/a
Default Scripting

I am trying to read from a file for the list of servers and then
instruct the script to login on these servers and run a command to
check one text file.

So far its done the below way...

cat server-list | \
while read line
do
echo "------------------------------------------------" >>test.out
echo " HOST : $line" >>test.out
echo "_____________________________________________ ___" >>test.out
rsh $line cat /home/basks.tbl|awk '{ print $1 }' >>test.out
done

The problem seems to be that script does not work !!! :-)

Any ideas around using cat wiht the while loop in a better way ?
Reply With Quote