>
> One shellscript for example that reads all routers out
> of an ASCII database or simply an ASCII database, that
> is read by script, here a snipplet from a script I use
> to save running config of all routers mentioned in file
> CISCOS=path
>
> for entry in `cat $CISCOS`
> do
> # read a line from router table and set arguments...
> set -- `echo $entry | tr ':' ' '`
> ip=$1
> name=$2
> type=$3
> passwd=$4
> enable=$5
> echo ">> writing config for $name ..."
> $HOME/scripts/write_config $ip $type $passwd $enable
> done
>
> $HOME/scripts/write_config:
> --------------------------
> CISCO=$1
> TYPE=$2
> PASSWORD=$3
> ENABLE=$4
>
> if [ $# -ne 4 ]; then
> echo "usage: write_config router | ip_address password enablepwd"
> exit 1
> fi
>
> case $TYPE in
> router)
> nc -w 10 $CISCO 23 << !EOM | sed -e "s/^M//g" | sed -e
>"1,/Password:/d"
> $PASSWORD
> ena
> $ENABLE
> term len 0
> wr
> quit
> !EOM
> ;;
> [...]
>
>
> You can use nc (netcat) to connect to the router instead of using expect
> which sometime hangs ...
>
> Andreas ///
>
> --
> Andreas Klemm http://people.FreeBSD.ORG/~andreas
> http://www.freebsd.org/~fsmp/SMP/SMP.html
> powered by Symmetric MultiProcessor FreeBSD
> New APSFILTER 542 and songs from our band - http://people.freebsd.org/~andreas
>
> ___________________________________
> UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
> FAQ, list archives, and subscription info: http://www.groupstudy.com
> Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]
>
-----------------------------------------------
Brian Feeny, CCNA, CCDA [EMAIL PROTECTED]
Network Administrator
ShreveNet Inc. (ASN 11881)
___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]