[5dd2882] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY expect-download-http "http://expect.nist.gov/old/expect-&expect-version;.tar.gz">
|
---|
| 8 | <!ENTITY expect-download-ftp " ">
|
---|
| 9 | <!ENTITY expect-md5sum "fea346fac6aaf74b0851f2441f478571">
|
---|
| 10 | <!ENTITY expect-size "525 KB">
|
---|
| 11 | <!ENTITY expect-buildsize "4.8 MB">
|
---|
| 12 | <!ENTITY expect-time "0.1 SBU">
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="expect" xreflabel="Expect-&expect-version;">
|
---|
| 16 | <sect1info>
|
---|
| 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
| 19 | </sect1info>
|
---|
| 20 | <?dbhtml filename="expect.html"?>
|
---|
| 21 | <title>Expect-&expect-version;</title>
|
---|
| 22 |
|
---|
| 23 | <sect2>
|
---|
| 24 | <title>Introduction to <application>Expect</application></title>
|
---|
| 25 |
|
---|
| 26 | <para>The <application>Expect</application> package contains tools for
|
---|
| 27 | automating interactive applications such as <command>telnet</command>,
|
---|
| 28 | <command>ftp</command>, <command>passwd</command>, <command>fsck</command>,
|
---|
| 29 | <command>rlogin</command>, <command>tip</command>, etc.
|
---|
| 30 | <application>Expect</application> is also useful for testing these same
|
---|
| 31 | applications as well as easing all sorts of tasks that are prohibitively
|
---|
| 32 | difficult with anything else.</para>
|
---|
| 33 |
|
---|
| 34 | <sect3><title>Package information</title>
|
---|
| 35 | <itemizedlist spacing="compact">
|
---|
| 36 | <listitem><para>Download (HTTP):
|
---|
| 37 | <ulink url="&expect-download-http;"/></para></listitem>
|
---|
| 38 | <listitem><para>Download (FTP):
|
---|
| 39 | <ulink url="&expect-download-ftp;"/></para></listitem>
|
---|
| 40 | <listitem><para>MD5 Sum: &expect-md5sum;</para></listitem>
|
---|
| 41 | <listitem><para>Download size: &expect-size;</para></listitem>
|
---|
| 42 | <listitem><para>Estimated Disk space required:
|
---|
| 43 | &expect-buildsize;</para></listitem>
|
---|
| 44 | <listitem><para>Estimated build time: &expect-time;</para></listitem>
|
---|
| 45 | </itemizedlist>
|
---|
| 46 | </sect3>
|
---|
| 47 |
|
---|
| 48 | <sect3><title>Additional downloads</title>
|
---|
| 49 | <itemizedlist spacing="compact">
|
---|
| 50 | <listitem><para>Required Patch: <ulink
|
---|
| 51 | url="&patch-root;/expect-&expect-version;-spawn-1.patch"/></para>
|
---|
| 52 | </listitem></itemizedlist>
|
---|
| 53 | </sect3>
|
---|
| 54 |
|
---|
| 55 | <sect3><title><application>Expect</application> dependencies</title>
|
---|
| 56 |
|
---|
| 57 | <sect4><title>Required</title>
|
---|
| 58 | <para><xref linkend="tcl"/></para>
|
---|
| 59 | </sect4>
|
---|
| 60 |
|
---|
| 61 | <sect4><title>Optional</title>
|
---|
| 62 | <para><xref linkend="tk"/></para>
|
---|
| 63 | </sect4>
|
---|
| 64 | </sect3>
|
---|
| 65 |
|
---|
| 66 | </sect2>
|
---|
| 67 |
|
---|
| 68 | <sect2>
|
---|
| 69 | <title>Installation of <application>Expect</application></title>
|
---|
| 70 |
|
---|
| 71 | <para>Install <application>Expect</application> by running the following
|
---|
| 72 | commands:</para>
|
---|
| 73 |
|
---|
| 74 | <screen><userinput><command>patch -Np1 -i ../expect-&expect-version;-spawn-1.patch &&
|
---|
| 75 | ./configure --prefix=/usr --with-tcl=/usr/lib \
|
---|
| 76 | --with-tclinclude=/usr/include/tcl8.4 --enable-shared &&
|
---|
| 77 | make &&
|
---|
| 78 | make install &&
|
---|
| 79 | ln -sf ../libexpect5.42.a /usr/lib/expect5.42</command></userinput></screen>
|
---|
| 80 |
|
---|
| 81 | </sect2>
|
---|
| 82 |
|
---|
| 83 | <sect2>
|
---|
| 84 | <title>Command explanations</title>
|
---|
| 85 |
|
---|
| 86 | <para><parameter>--enable-shared</parameter>: This option enables building the
|
---|
| 87 | shared library.</para>
|
---|
| 88 |
|
---|
| 89 | <para><option>--with-tk=/usr/lib</option>: Use this option to link in the
|
---|
| 90 | <application>Tk</application> library.</para>
|
---|
| 91 |
|
---|
| 92 | <para><command>ln -sf ../libexpect5.42.a /usr/lib/expect5.42</command>: This
|
---|
| 93 | command creates a required link to the static library.</para>
|
---|
| 94 |
|
---|
| 95 | </sect2>
|
---|
| 96 |
|
---|
| 97 | <sect2>
|
---|
| 98 | <title>Configuring <application>Expect</application></title>
|
---|
| 99 |
|
---|
| 100 | <sect3><title>Config files</title>
|
---|
| 101 | <para><filename>$exp_library/expect.rc</filename> and
|
---|
| 102 | <filename>~/.expect.rc</filename></para>
|
---|
| 103 | </sect3>
|
---|
| 104 |
|
---|
| 105 | <sect3><title>Configuration Information</title>
|
---|
| 106 |
|
---|
| 107 | <para>Reference the <command>expect</command> man page for information about
|
---|
| 108 | utilizing the <filename>expect.rc</filename> configuration files. Additionally,
|
---|
| 109 | many of the tools contained in the <application>Expect</application> package
|
---|
| 110 | will use their own configuration files. Reference the respective man page, or
|
---|
| 111 | examine the script directly for configuration file information.</para>
|
---|
| 112 | </sect3>
|
---|
| 113 |
|
---|
| 114 | </sect2>
|
---|
| 115 |
|
---|
| 116 | <sect2>
|
---|
| 117 | <title>Contents</title>
|
---|
| 118 |
|
---|
| 119 | <para>The <application>Expect</application> package contains the
|
---|
| 120 | <filename class='libraryfile'>libexpect</filename> libraries,
|
---|
| 121 | <command>autoexpect</command>,
|
---|
| 122 | <command>autopasswd</command>,
|
---|
| 123 | <command>cryptdir</command>,
|
---|
| 124 | <command>decryptdir</command>,
|
---|
| 125 | <command>dislocate</command>,
|
---|
| 126 | <command>expect</command>,
|
---|
| 127 | <command>ftp-rfc</command>,
|
---|
| 128 | <command>kibitz</command>,
|
---|
| 129 | <command>lpunlock</command>,
|
---|
| 130 | <command>mkpasswd</command>,
|
---|
| 131 | <command>passmass</command>,
|
---|
| 132 | <command>rftp</command>,
|
---|
| 133 | <command>rlogin-cwd</command>,
|
---|
| 134 | <command>timed-read</command>,
|
---|
| 135 | <command>timed-run</command>,
|
---|
| 136 | <command>unbuffer</command>,
|
---|
| 137 | <command>weather</command> and optionally
|
---|
| 138 | (if <application>expect</application> was linked against
|
---|
| 139 | <application>Tk</application>),
|
---|
| 140 | <command>expectk</command>,
|
---|
| 141 | <command>multixterm</command>,
|
---|
| 142 | <command>tknewsbiff</command>,
|
---|
| 143 | <command>tkpasswd</command>,
|
---|
| 144 | <command>xkibitz</command> and
|
---|
| 145 | <command>xpstat</command>.</para>
|
---|
| 146 |
|
---|
| 147 | </sect2>
|
---|
| 148 |
|
---|
| 149 | <sect2><title>Description</title>
|
---|
| 150 |
|
---|
| 151 | <sect3><title>autoexpect</title>
|
---|
| 152 | <para><command>autoexpect</command> generates an
|
---|
| 153 | <application>Expect</application> script from watching a session.</para>
|
---|
| 154 | </sect3>
|
---|
| 155 |
|
---|
| 156 | <sect3><title>autopasswd</title>
|
---|
| 157 | <para><command>autopasswd</command> is a wrapper to make passwd(1) be
|
---|
| 158 | non-interactive.</para>
|
---|
| 159 | </sect3>
|
---|
| 160 |
|
---|
| 161 | <sect3><title>cryptdir</title>
|
---|
| 162 | <para><command>cryptdir</command> encrypts all files in a directory.</para>
|
---|
| 163 | </sect3>
|
---|
| 164 |
|
---|
| 165 | <sect3><title>decryptdir</title>
|
---|
| 166 | <para><command>decryptdir</command> decrypts all files in a directory.</para>
|
---|
| 167 | </sect3>
|
---|
| 168 |
|
---|
| 169 | <sect3><title>dislocate</title>
|
---|
| 170 | <para><command>dislocate</command> allows processes to be disconnected and
|
---|
| 171 | reconnected to a terminal.</para>
|
---|
| 172 | </sect3>
|
---|
| 173 |
|
---|
| 174 | <sect3><title>expect</title>
|
---|
| 175 | <para><command>expect</command> is a program that <quote>talks</quote> to
|
---|
| 176 | other interactive programs according to a script.</para>
|
---|
| 177 | </sect3>
|
---|
| 178 |
|
---|
| 179 | <sect3><title>ftp-rfc</title>
|
---|
| 180 | <para><command>ftp-rfc</command> retrieves an rfc (or the index) from
|
---|
| 181 | uunet.</para>
|
---|
| 182 | </sect3>
|
---|
| 183 |
|
---|
| 184 | <sect3><title>kibitz</title>
|
---|
| 185 | <para><command>kibitz</command> allows two (or more) people to interact with
|
---|
| 186 | one shell (or any arbitrary program).</para>
|
---|
| 187 | </sect3>
|
---|
| 188 |
|
---|
| 189 | <sect3><title>lpunlock</title>
|
---|
| 190 | <para><command>lpunlock</command> unhangs a printer which claims it is
|
---|
| 191 | <quote>waiting for lock</quote>.</para>
|
---|
| 192 | </sect3>
|
---|
| 193 |
|
---|
| 194 | <sect3><title>mkpasswd</title>
|
---|
| 195 | <para><command>mkpasswd</command> generates passwords and can apply them
|
---|
| 196 | automatically to users.</para>
|
---|
| 197 | </sect3>
|
---|
| 198 |
|
---|
| 199 | <sect3><title>passmass</title>
|
---|
| 200 | <para><command>passmass</command> changes a password on multiple
|
---|
| 201 | machines.</para>
|
---|
| 202 | </sect3>
|
---|
| 203 |
|
---|
| 204 | <sect3><title>rftp</title>
|
---|
| 205 | <para><command>rftp</command> is much like <command>ftp</command> except
|
---|
| 206 | it uses '~g' and '~p' instead of 'mget' and 'mput'.</para>
|
---|
| 207 | </sect3>
|
---|
| 208 |
|
---|
| 209 | <sect3><title>rlogin-cwd</title>
|
---|
| 210 | <para><command>rlogin-cwd</command> is <command>rlogin</command> except
|
---|
| 211 | it uses the local current directory as the current working directory on the
|
---|
| 212 | remote machine.</para>
|
---|
| 213 | </sect3>
|
---|
| 214 |
|
---|
| 215 | <sect3><title>timed-read</title>
|
---|
| 216 | <para><command>timed-read</command> reads a complete line from stdin
|
---|
| 217 | and aborts after a given number of seconds.</para>
|
---|
| 218 | </sect3>
|
---|
| 219 |
|
---|
| 220 | <sect3><title>timed-run</title>
|
---|
| 221 | <para><command>timed-run</command> runs a program for a given amount of
|
---|
| 222 | time.</para>
|
---|
| 223 | </sect3>
|
---|
| 224 |
|
---|
| 225 | <sect3><title>unbuffer</title>
|
---|
| 226 | <para><command>unbuffer</command> disables the output buffering that occurs
|
---|
| 227 | when program output is redirected.</para>
|
---|
| 228 | </sect3>
|
---|
| 229 |
|
---|
| 230 | <sect3><title>weather</title>
|
---|
| 231 | <para><command>weather</command> retrieves a weather report (courtesy
|
---|
| 232 | University of Michigan) for a given city or geographical area.</para>
|
---|
| 233 | </sect3>
|
---|
| 234 |
|
---|
| 235 | <sect3><title>expectk</title>
|
---|
| 236 | <para><command>expectk</command> is a combination of
|
---|
| 237 | <application>Expect</application> with <application>Tk</application> and should
|
---|
| 238 | run any <command>wish</command> or <application>Expect</application>
|
---|
| 239 | script.</para>
|
---|
| 240 | </sect3>
|
---|
| 241 |
|
---|
| 242 | <sect3><title>multixterm</title>
|
---|
| 243 | <para><command>multixterm</command> creates multiple <command>xterm</command>s
|
---|
| 244 | that can be driven together or separately.</para>
|
---|
| 245 | </sect3>
|
---|
| 246 |
|
---|
| 247 | <sect3><title>tknewsbiff</title>
|
---|
| 248 | <para><command>tknewsbiff</command> pops up a window when there is unread news
|
---|
| 249 | in your favorite newsgroups and removes the window after you've read the
|
---|
| 250 | news.</para>
|
---|
| 251 | </sect3>
|
---|
| 252 |
|
---|
| 253 | <sect3><title>tkpasswd</title>
|
---|
| 254 | <para><command>tkpasswd</command> is a script to change passwords using
|
---|
| 255 | <command>expectk</command>.</para>
|
---|
| 256 | </sect3>
|
---|
| 257 |
|
---|
| 258 | <sect3><title>xkibitz</title>
|
---|
| 259 | <para><command>xkibitz</command> allows users in separate
|
---|
| 260 | <command>xterm</command>s to share one shell (or any program that runs in an
|
---|
| 261 | <command>xterm</command>).</para>
|
---|
| 262 | </sect3>
|
---|
| 263 |
|
---|
| 264 | <sect3><title>xpstat</title>
|
---|
| 265 | <para><command>xpstat</command> is a script that acts as a front-end for
|
---|
| 266 | <command>xpilot</command>.</para>
|
---|
| 267 | </sect3>
|
---|
| 268 |
|
---|
| 269 | </sect2>
|
---|
| 270 |
|
---|
| 271 | </sect1>
|
---|
| 272 |
|
---|