From owner-freebsd-questions Mon Sep 29 17:04:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA19460 for questions-outgoing; Mon, 29 Sep 1997 17:04:38 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA19452 for ; Mon, 29 Sep 1997 17:04:31 -0700 (PDT) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id AAA03835; Tue, 30 Sep 1997 00:54:35 +0100 (BST) Message-Id: <199709292354.AAA03835@awfulhak.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Carey Nairn cc: Brian Somers , Terry Dwyer 61 8 9491 5161 , questions@freefall.FreeBSD.org Subject: Re: iijppp and chat scripts In-reply-to: Your message of "Mon, 29 Sep 1997 23:37:44 +1000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 30 Sep 1997 00:54:35 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > On Sat, 27 Sep 1997, Brian Somers wrote: > > > > On Sat, 27 Sep 1997, Carey Nairn wrote: > > > > > > I don't think you have to wait for the last char in the prompt string to > > > arrive before you can do a match. It may be worthwhile to try matching > > > on the string "name" in the termserver's prompt assuming what you've > > > shown below is the actual prompt you see. > > > > Or you could do a few expect/sends for different bits of the same > > prompt. For example, if you've got > > > > login on abcde: > > or > > login on defgh: > > > > (with spaces at the end of each), you could have a chat that does > > > > set login "login\son\s \"\" \\s MyLogin" > > > > > > hi guys, > > > > > > > > I'm looking for a chat guru... > > > > > > > > When I dial in to my provider, I will get a different prompt depending on > > > > which terminal server I connect to. Is there a way in the login script to > > > > test for on of multiple different prompts? > > > > > > > > e.g. > > > > > > > > login to ts1, prompt is ts1name> > > > > login to ts2, prompt is ts2name# > > > > > > Both pmrompts are completely unique so Terry's suggestion won't work > unfortunately. What I need is to try Brian's idea and put in a couple of > different expect values and hope the terminal server doesn't hangup > waiting for the timeouts. This isn't fair - the ISP is cheating :-( You could also try set login "TIMEOUT 3 assword:-MyLogin-assword: MyPassword" So that you just wait a few seconds and then fire the logon.... The only alternative is wild card matching. Feel free to send patches so that you can say set login -r ".. MyLogin assword: MyPassword" or set login -r "{ts1name>,ts2name#} MyLogin assword: MyPassword" where the first bits are regular expressions ;-) > thanks guys, > Carey Nairn > -- Brian , , Don't _EVER_ lose your sense of humour....