From owner-freebsd-questions@FreeBSD.ORG Mon May 23 01:17:07 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4276616A41C for ; Mon, 23 May 2005 01:17:07 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: from web54001.mail.yahoo.com (web54001.mail.yahoo.com [206.190.36.225]) by mx1.FreeBSD.org (Postfix) with SMTP id C207243D49 for ; Mon, 23 May 2005 01:17:06 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: (qmail 73364 invoked by uid 60001); 23 May 2005 01:17:06 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=F62vMuGTIvwwq4SkTP2vbhPAwlMWCX2hIvJTtaeCYANkOzSmR3AYH9NfV+KwAEPNK1AzgmpLAgjm8y/IB274BGcYLrK9hhae6sjMkYQD+PSahRIAxfHhXSBjMBV+2B8+26TJybCZseLTltcGzhT/RV1QZuqUMPIOPONzE6WW1Dk= ; Message-ID: <20050523011706.73362.qmail@web54001.mail.yahoo.com> Received: from [147.46.44.181] by web54001.mail.yahoo.com via HTTP; Sun, 22 May 2005 18:17:05 PDT Date: Sun, 22 May 2005 18:17:05 -0700 (PDT) From: Rob To: phusion2k@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: FreeBSD questions Subject: Re: Help with Expect X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2005 01:17:07 -0000 Phusion wrote: > 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. I'm not an expect expert. I used it only once. Maybe that 'man autoexpect' could help you out. Autoexpect accepts a sequence of commands and wraps it in an expect script. Regards, Rob. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com