diff --git a/reference/expect/reference.xml b/reference/expect/reference.xml new file mode 100644 index 0000000000..0d6b202417 --- /dev/null +++ b/reference/expect/reference.xml @@ -0,0 +1,105 @@ + + + + + + + Expect Functions + Expect + + +
+ &reftitle.intro; + + This extension allows to interact with processes through PTY. You may + consider using the expect:// + wrapper with the filesystem + functions which provide a simpler and more intuitive interface. + +
+ +
+ &reftitle.required; + + This module uses the functions of the expect library. + You need libexpect version >= 5.43.0. + +
+ + &reference.expect.configure; + + &reference.expect.ini; + +
+ &reftitle.resources; + &no.resource; +
+ + &reference.expect.constants; + +
+ &reftitle.examples; + + This example connects to the remote host via SSH, and prints the remote + uptime. + + + Expect Usage Example + + "password:", 1 => "PASSWORD") +); + +switch (expect_expectl ($fp, $cases)) +{ + case "PASSWORD": + fwrite ($fp, "password\n"); + break; + + default: + die ("Error was occurred while connecting to the remote host!\n"); +} + +while ($line = fgets ($fp)) { + print $line; +} +fclose ($fp); + +?> +]]> + + +
+
+ +&reference.expect.functions; + +
+