On Thu, Apr 16, 2009 at 11:28:10AM +0530, Kurian Thayil
([email protected]) wrote:
> I got your modification working only when telnet gives a prompt,
Right you are - telnet doesn't react to the escape sequence
before connecting. Bummer. :-(
Oh well, just kill it then:
#! /bin/bash
case "$( (sleep 5; echo quit; ps |awk '/telnet/{print "kill "$1}' |sh) | telnet
192.168.0.20 25 2>&- )"
in
*'
220 '*) echo Success ;;
*) echo Failed ;;
esac
--
Tapani Tarvainen
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]