icecc/icecream-monitor

15 lines
268 B
Plaintext

#!/usr/bin/expect
#
# Icecream command line monitoring tool
# Copyright (c) 2012 by Silvan Calarco
#
set timeout 20
set address [lrange $argv 0 0]
set command [lrange $argv 1 1]
spawn telnet $address 8766
expect "200 "
send "$command\n"
expect "200 done"
send "quit"