#!/usr/bin/expect # # $Id: catm-dump.sex,v 1.1 2001/07/17 05:43:48 jwa Exp $ # set host [lindex $argv 0] set pass [lindex $argv 1] log_user 1 log_file catm.out spawn telnet $host expect "Password: " send "$pass\n" expect ">" send "enable\n" expect "Password:" send "$pass\n" expect "#" send "terminal length 0\n" expect "#" for {} 1 {} { send "undebug atm packet interface ATM1/0.1\n" expect "#" send "show log\n" expect "#" send "clear logging\n" expect "confirm" send "y" expect "#" send "debug atm packet interface ATM1/0.1\n" expect "#" sleep 10 }