Re: utter newbie expect question




This is the error message I get. I don't see the typo, but I assume
that it is there. Any ideas? Thanks again.

wrong # args: should be "send ignore arg"
while executing
"send " " "
invoked from within
"expect -nobrace {<SPACE> to continue} {send " " ; exp_continue}
{Choose one (X,Y,Z} {send -- "y"}"
invoked from within
"expect {
"<SPACE> to continue" {send " " ; exp_continue}
"Choose one (X,Y,Z" {send -- "y"}
}"




On May 29, 2:51 pm, Mark Janssen <mpc.jans...@xxxxxxxxx> wrote:
On May 29, 8:40 pm, Artis Gripemore <wealthe...@xxxxxxxxx> wrote:

Thanks very much! I suppose if I put a ;return after the send -- "y"
that I could break out of this, if I had more script to run after the
match on X, Y, Z?

"(X, Y, Z" {send -- "y" ;return}

Otherwise, it would continue with the next expect statement anyway,
once it timed out, correct?

No, by default the expect command will normally return after a match,
a timeout or a eof has occured. It's the exp_continue in the other
case that will keep on running the expect command so a return is not
necessary. See alsohttp://www.tcl.tk/man/expect5.31/expect.1.html

Mark


.



Relevant Pages

  • Shell functions to manipulate the PATH
    ... Yes, quite often when the newbies want to change the PATH it is misguided, ... because they are trying to run a /sbin command as ordinary users. ... Then the script is less ... # `path --append args' appends args, ...
    (comp.os.linux.setup)
  • RE: FW: Passing large number of arguments to a program
    ... The program is called from inside the DCL jacket as a "foreign command". ... $ prog 'args' ...
    (comp.os.vms)
  • Re: Command line arguments question (Windows XP)
    ... What the fuck is going on? ... I've been using command line parameters for years. ... are concatenated into a single string. ...
    (comp.lang.python)
  • Re: Translating parse result into instances
    ... where COMMAND is the initial string, and ARGS are everything else. ... This macro implements one part of the parser. ...
    (comp.lang.lisp)
  • Re: f77, f90, f95 or f2003?
    ... Wade Ward wrote: ... If you use "system call" to reference functionality provided by the OS, then that by necessity must be language-neutral - otherwise the only language you could use on that OS would be C, hey, not even assembler code? ... Richard Maine posted source for how to get command line args in fortran. ...
    (comp.lang.fortran)