Help with Expect

Phusion phusion2k at gmail.com
Sun May 22 17:30:07 PDT 2005


I need some help with an expect script I'm trying to write. Here's
what I would like to do.

- Ping the host to see if it's up.
  a. If the host responds to pings telnet into it.
  b. If the host doesn't respond to pings write that to a log file and
close the expect script properly.

The host does respond to pings. I was thinking if I see a ttl in the
response packet to assume it's up and telnet into it. Let me know how
I can do the following with expect. Also, how do I close an expect
script properly? Thanks.


More information about the freebsd-questions mailing list