Re: Quick question about expect
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Quick question about expect

From: Adrian Ho <tcl@03s.net>
Date: Fri Mar 24 2006 - 01:17:07 CET

On 2006-03-23, Babylon <gmknews@gmail.com> wrote:
> Yes, I agree that you can use it through expect.
> in fact... I have succeeded to do the following:
> spawn screen -t root@server
> spawn screen ssh root@server
> but that starts up screen, AND runs ssh, but instead of ssh running IN the
> screen that I created, it runs in the initial shell... what I want is the
> effect that I would get from running screen -t root@server ssh root@server
> which would run that ssh session IN that screen that I just created.

Replace the above command pair with:

spawn screen -m -t root@server ssh root@server

Read the screen man page for a description of what the "-m" option does.
If your screen binary doesn't support "-m", it's *way* too old -- it's
been available since 3.2.2.

- Adrian
Received on Sun Apr 30 02:47:08 2006