Re: autoexpect on 5.0.7

From: Tony Lawrence (foo_at_pcunix.com)
Date: 04/22/05


Date: Fri, 22 Apr 2005 10:57:48 -0400

Rob wrote:
> 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

Right. That's how it is supposed to work. But on two 5.0.7 boxes I
have sshed to, it just hangs as I described. It's seeing commands -
"exit" terminates the shell, but it doesn't display anything and it
doesn't write a script. I still haven't gotten anyone to try it logged
in directly (not through ssh) but that's next on my list.

-- 
Tony Lawrence
Unix/Linux/Mac OS X  resources: http://aplawrence.com


Relevant Pages

  • Re: autoexpect on 5.0.7
    ... Rob wrote: ... > I just stumbled against the above stty setting since I modified my SCO ... > By testing the autoexpect script with the above settings in operation, ... Tony Lawrence ...
    (comp.unix.sco.misc)
  • Re: CMD prompt problems
    ... >> Hi, Rob. ... Ipconfig and ping work fine for me. ... >> Prompt window? ... Or are you running these commands from the Run ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Omitting empty field
    ... Rob ... > MailMergeHelper in the list of commands and drag it to a toolbar or menu ... usually labels or envelopes which are connect ...
    (microsoft.public.word.mailmerge.fields)
  • Re: autoexpect on 5.0.7
    ... Rob wrote: ... >>doesn't write a script. ... > In attach you'll find a stty file which allowed me to bypass the ... Tony Lawrence ...
    (comp.unix.sco.misc)
  • RE: Cant issue commands from Command Prompt
    ... these commands are disabled by the firewall,,,go to firewall,, advanced ect ... "Rob" wrote: ...
    (microsoft.public.windowsxp.help_and_support)