Re: autoexpect on 5.0.7
From: Rob (rob_at_nottobefoundhere.com)
Date: 04/22/05
- Next message: Rob: "Re: Data Replication"
- Previous message: Rob S: "useradd with null passwords?"
- In reply to: Tony Lawrence: "Re: autoexpect on 5.0.7"
- Next in thread: Tony Lawrence: "Re: autoexpect on 5.0.7"
- Reply: Tony Lawrence: "Re: autoexpect on 5.0.7"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 22 Apr 2005 15:18:29 +0200
Tony Lawrence wrote:
> Jean-Pierre Radley wrote:
>
>>Tony Lawrence typed (on Mon, Apr 18, 2005 at 11:17:18AM -0400):
>>| I'm sure I've used autoexpect on SCO systems in the past, but maybe not..
>>|
>>| I tried both versions from Skunkware. "autoexpect" by itself should,
>>| for example, just show a shell prompt and continue from there. Instead,
>>| everything seems to be buffered - which I expect autexpect to take care
>>| of by itself.
>>|
>>| I've tried this on two systems now, same results. If I start autoexpect
>>| somewhere else, I can ssh on into the SCO and everything is fine, but
>>| not if I ssh in and start it there..
>>|
>>| I'm baffled..
>>
>>
>>I'm not sure what you mean by "everything is buffered". I'd not run
>>autoexpect in years, but I just tried it on 5.0.6 and on 5.0.7, and saw no
>>difference in what happened, or in the resultant capture scripts.
>>
>>
>
>
> Boy, that is weird. I tried this on two systems, with two versions from
> Skunkware - and neither work. What I mean by buffered is that nothing
> is appearing on the screen - no shell prompt, no anything. If I type
> commands, etc. they work, but don't appear on the screen until I type
> exit, and then the script.exp (after the usual preamble) is just
>
> set timeout -1
> spawn $env(SHELL)
> match_max 100000
> expect eof
>
> If I run that, I get the somewhat similar behavior - one shell prompt,
> then no prompts, no apparent response to commands:
>
> $ ./script.exp
> spawn /bin/sh
> $ ls
>
>
> ls > /tmp/that
>
> (ctrl-c no response - yes intr is set to ctrl-c not del)
>
> (CTRL-\ here)
>
>
> $ cat /tmp/that
> cat: cannot open /tmp/that: No such file or directory (error 2)
>
> $
>
> Obviously some unexpected buffering going on but I do not know why..
>
Tony,
perhaps I did not understand what you're trying to achieve (and this is
pretty normal on Friday :-) but I gave "autoexpect" a try to see if it
could "mimic" what I typed at the keyboard (well, via telnet to tell the
truth) of a SCO OS 5.0.5 box.
I started "autoexec" (which, in turn, spawned a shell) and I typed some
commands; once I hit CTRL-D, autoexpect generated the script.exp file
which I executed.
I have to tell that I had some problems at first when I started commands
which gave different results every time they got run (eg, "date" and "ps
-ef") but as soon as I started a command which always gave the same
output, I was fine.
The only problem I got was related to the final
expect eof
which I had to change with a simple "exit".
I know, this is on SCO OS 5.0.5 with Expect 5.25 from Skunkware98 but
I'll see if I can get my hands on a 5.0.7 box.
Best,
Rob
--
Roberto Zini - r.zini<@AT@>strhold.it
---------------------------------------------------------------------
"Has anybody around here seen an aircraft carrier?"
(Pete "Maverick" Mitchell - Top Gun)
- Next message: Rob: "Re: Data Replication"
- Previous message: Rob S: "useradd with null passwords?"
- In reply to: Tony Lawrence: "Re: autoexpect on 5.0.7"
- Next in thread: Tony Lawrence: "Re: autoexpect on 5.0.7"
- Reply: Tony Lawrence: "Re: autoexpect on 5.0.7"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]