Have a look at expect. From freshmeat
"Expect is a tool for automating interactive applications such
as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really
makes this stuff trivial. Expect is also useful for testing
these same applications. And by adding Tk, you can also wrap
interactive applications in X11 GUIs.
"Expect can make easy all sorts of tasks that are prohibitively
difficult with anything else. You will find that Expect is an
absolutely invaluable tool - using it, you will be able to
automate tasks that you've never even thought of before - and
you'll be able to do this automation quickly and easily."
Expect requires Tcl, and Tk is a good idea. It will work with
8.0, or the later 7.x series of Tcl. Runs on any version of
Unix - I'm using it on Slackware 3.4. It seems to be as good
as the above hype suggests.
Rodos
Peter Rundle wrote:
>
> Hi Sluggers,
>
> I'm trying to write a shell that automatically telnets to a
> remote host and executes a command on that host. Kinda like
> what I can do with ftp and the .netrc file were I have
> a "get" in the .netrc file and thus I can run a shell as
> a cron and once a day get a file from a remote machine.
>
> The .telnetrc file doesn't seem to have quite the same syntax
> as the .netrc file. It allows me to run a "telnet" command
> but not a remote host command.
>
> Any ideas.
>
> (I can't change the software on the remote host unfortunately)
>
> Thanks
>
> Pete
> --
> SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
> To unsubscribe send email to [EMAIL PROTECTED] with
> unsubscribe in the text
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text