01-10-2006
2,
0
Join Date: Jan 2006
Last Activity: 14 January 2006, 9:17 PM EST
Posts: 2
Thanks Given: 0
Thanked 0 Times in 0 Posts
Hi,
please refer to the script below,
for i in `cat test.txt`
do
(echo "userid";
echo "password"
echo " sh ver"
grep System returned to ROM by error > error.txt
echo "lo";
sleep 5) | telnet $i
done
in test.txt ill define a couple of routers,
i need the script to run a issue a sh ver command on all those routers..till here it works fine.
now i want the list of routers that have the output mentioned in grep cmd in a seperate file..(error.txt)
m not very good at this but found it interesting,any inputs wud be of a great help.thanx for replying.
looking forward for a reply.
thnx