UNIX scripts for router

Hi,

I want to write a script in unix for my routers which will collect the output to a file..

how do i do that?

thanks in advance

Could you give us exactly what you want?

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

You'd be much better off using Perl and Net::Telnet::Cisco to implement this....

Cheers
ZB