can *awk manage telnet sessions?
What you want can undoubtedly be done with tcl/expect.
It might work with gawk 3.1.2 and 3.1.3; see the doc which tells you how
to make gawk use ptys instead of pipes for communication. Basically,
it's
BEGIN {
scommand="telnet 10.0.14.10"
PROCINFO[scommand, "pty"] = 1
# rest of code as before
}
No guarantees though!
Good luck,
Arnold
--
Aharon (Arnold) Robbins --- Pioneer Consulting Ltd. arnold AT skeeve DOT com
P.O. Box 354 Home Phone: +972 8 979-0381 Fax: +1 530 688 5518
Nof Ayalon Cell Phone: +972 51 297-545
D.N. Shimshon 99785 ISRAEL
|