Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 1999 10:43:26 +0100
From:      pooka@redbrick.dcu.ie (Tiny Non Cats)
To:        Morten Seeberg <morten@seeberg.dk>
Cc:        questions@FreeBSD.ORG
Subject:   Re: FreeBSD Commandline Makro Function
Message-ID:  <19990813104326.B14800@mother.redbrick.dcu.ie>
In-Reply-To: <37B3E09F.9C1E8752@baker.ie>; from Cillian Sharkey on Fri, Aug 13, 1999 at 10:08:47AM %2B0100
References:  <000f01bee56b$a3dca3c0$a00f010a@SOS> <37B3E09F.9C1E8752@baker.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 13, 1999 at 10:08:47AM +0100 Cillian Sharkey said:
> as for doing automatic telnets etc. you might want
> to look at the "expect" program which as far as I know
> is designed for send/expect type situations..
> 
You can also do something along the lines of:

---
#!/bin/sh

(echo "username"; sleep 2; echo "password"; sleep 2; \
 echo "echo Hi there, this is where you'd put the commands | mail username"; \
 sleep 2; echo "exit") | telnet hostname

---

Of course, that's cheating. ;o)

Cian

-- 
What think ye of Christ? Whose son is he? Will you, like Peter, boldly say: 

                           "Who?" 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990813104326.B14800>