1 #!/usr/local/bin/expect --
2 # a dumb little 'expect' program to check the status of gw.wd0fhg.ampr.org
10 puts [timestamp -format %c] ;# time tag the output
13 expect "login: " { send "$call\r" }
14 expect "word: " { send "$pass\r" }
16 expect "NET/ROM*" { send "j \r" } ;# for now we will just look at ax0
18 expect { ;# no easy way to tell that the list is
19 ;# complete so we'll just time out
20 "NET/WRONG*" {} ;# looking for we can't find.
23 expect "*" { send "\r@\r" };# flush the expect buffer and go to sysop
25 expect $prompt { send "uptime\r" }
26 expect $prompt { send "syncstat\r" }
27 expect $prompt { send "asystat\r" }
28 expect $prompt { send "dom db\r" }
29 expect $prompt { send "route\r" }
30 expect $prompt { send "exit\r" }
34 expect "*" { send "\rb\r" };# flush the expect buffer and signoff
36 expect "closed*" ;# wait for the connection to close