From owner-freebsd-questions@FreeBSD.ORG Thu Feb 3 17:46:49 2005 Return-Path: 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 C7A3516A4CF for ; Thu, 3 Feb 2005 17:46:49 +0000 (GMT) Received: from sccimhc91.asp.att.net (sccimhc91.asp.att.net [63.240.76.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B24643D41 for ; Thu, 3 Feb 2005 17:46:49 +0000 (GMT) (envelope-from FreeBSD@insightbb.com) Received: from [192.168.1.239] (12-202-28-183.client.insightbb.com[12.202.28.183]) by sccimhc91.asp.att.net (sccimhc91) with ESMTP id <20050203174648i9100k50d9e>; Thu, 3 Feb 2005 17:46:48 +0000 From: Steven Friedrich To: freebsd-questions@freebsd.org, jaymo@cromagnon.cullmail.com Date: Thu, 3 Feb 2005 12:46:47 -0500 User-Agent: KMail/1.7.2 References: <200501300533.51350.jaymo@cromagnon.cullmail.com> <20050201122226.GM8619@alzatex.com> <200502030502.28281.jaymo@cromagnon.cullmail.com> In-Reply-To: <200502030502.28281.jaymo@cromagnon.cullmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502031246.47338.FreeBSD@insightbb.com> cc: "Loren M. Lang" Subject: Re: running interactive program from shell script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2005 17:46:49 -0000 On Thursday 03 February 2005 06:02 am, Jay Moore wrote: > > > #! /bin/sh > > > > > > (sleep 3; > > > echo "password"; > > > sleep 3; > > > echo "ls -la"; > > > sleep 3; > > > ) | telnet -l user 192.168.0.2 did you try: #! /bin/sh while [ 1 ] do (sleep 3; echo "password"; sleep 3; echo "ls -la"; sleep 3; ) | telnet -l user 192.168.0.2 done This is what I alluded to in a previous post... -- i386 FreeBSD 4.11-STABLE