while read ciscorouter
echo sho ver
)|telnet $ciscorouter > /var/tmp/version.$$
ver=`grep IOS /var/tmp/version.$$ | cut -d, -f2`
echo $ciscorouter $ver >> reportname
done < routerlist
should be self explanatory, goes through a list of cisco routers ( we have a couple hundred here ). for each router it telnets to it and does a sho ver then cuts that to just the IOS version and dumps the router name and version as side by side columns to a file.
my problem is I don't want any output to the terminal while this script is run. but when it runs I get a "connection to $ciscorouter closed by foreign host" dumped to the terminal for ever router it logs into. please help get rid of this extra output for me. thanks in advance