[5dd2882] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[5dd2882] | 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 " ">
|
---|
[cf01fa4a] | 9 | <!ENTITY expect-md5sum "230400129630335b3060a42f66fec11d">
|
---|
[5dd2882] | 10 | <!ENTITY expect-size "525 KB">
|
---|
[cf01fa4a] | 11 | <!ENTITY expect-buildsize "4.6 MB">
|
---|
| 12 | <!ENTITY expect-time "0.07 SBU">
|
---|
[5dd2882] | 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>
|
---|
[ffcbd0d] | 22 | <indexterm zone="expect">
|
---|
| 23 | <primary sortas="a-Expect">Expect</primary></indexterm>
|
---|
[5dd2882] | 24 |
|
---|
| 25 | <sect2>
|
---|
| 26 | <title>Introduction to <application>Expect</application></title>
|
---|
| 27 |
|
---|
| 28 | <para>The <application>Expect</application> package contains tools for
|
---|
| 29 | automating interactive applications such as <command>telnet</command>,
|
---|
| 30 | <command>ftp</command>, <command>passwd</command>, <command>fsck</command>,
|
---|
| 31 | <command>rlogin</command>, <command>tip</command>, etc.
|
---|
| 32 | <application>Expect</application> is also useful for testing these same
|
---|
| 33 | applications as well as easing all sorts of tasks that are prohibitively
|
---|
| 34 | difficult with anything else.</para>
|
---|
| 35 |
|
---|
| 36 | <sect3><title>Package information</title>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem><para>Download (HTTP):
|
---|
| 39 | <ulink url="&expect-download-http;"/></para></listitem>
|
---|
| 40 | <listitem><para>Download (FTP):
|
---|
| 41 | <ulink url="&expect-download-ftp;"/></para></listitem>
|
---|
[dc2f5ad] | 42 | <listitem><para>Download MD5 Sum: &expect-md5sum;</para></listitem>
|
---|
[5dd2882] | 43 | <listitem><para>Download size: &expect-size;</para></listitem>
|
---|
[518538f] | 44 | <listitem><para>Estimated disk space required:
|
---|
[5dd2882] | 45 | &expect-buildsize;</para></listitem>
|
---|
| 46 | <listitem><para>Estimated build time: &expect-time;</para></listitem>
|
---|
| 47 | </itemizedlist>
|
---|
| 48 | </sect3>
|
---|
| 49 |
|
---|
| 50 | <sect3><title>Additional downloads</title>
|
---|
| 51 | <itemizedlist spacing="compact">
|
---|
| 52 | <listitem><para>Required Patch: <ulink
|
---|
[cf01fa4a] | 53 | url="&patch-root;/expect-&expect-version;-spawn-2.patch"/></para>
|
---|
[5dd2882] | 54 | </listitem></itemizedlist>
|
---|
| 55 | </sect3>
|
---|
| 56 |
|
---|
| 57 | <sect3><title><application>Expect</application> dependencies</title>
|
---|
| 58 | <sect4><title>Required</title>
|
---|
| 59 | <para><xref linkend="tcl"/></para>
|
---|
| 60 | </sect4>
|
---|
| 61 |
|
---|
| 62 | <sect4><title>Optional</title>
|
---|
| 63 | <para><xref linkend="tk"/></para>
|
---|
| 64 | </sect4>
|
---|
| 65 | </sect3>
|
---|
| 66 |
|
---|
| 67 | </sect2>
|
---|
| 68 |
|
---|
| 69 | <sect2>
|
---|
| 70 | <title>Installation of <application>Expect</application></title>
|
---|
| 71 |
|
---|
| 72 | <para>Install <application>Expect</application> by running the following
|
---|
| 73 | commands:</para>
|
---|
| 74 |
|
---|
[cf01fa4a] | 75 | <screen><userinput><command>patch -Np1 -i ../expect-&expect-version;-spawn-2.patch &&
|
---|
[5dd2882] | 76 | ./configure --prefix=/usr --with-tcl=/usr/lib \
|
---|
| 77 | --with-tclinclude=/usr/include/tcl8.4 --enable-shared &&
|
---|
[ffcbd0d] | 78 | make</command></userinput></screen>
|
---|
| 79 |
|
---|
| 80 | <para>Now, as the root user:</para>
|
---|
| 81 |
|
---|
| 82 | <screen><userinput role='root'><command>make install &&
|
---|
[72d9ade0] | 83 | ln -sf ../libexpect5.43.a /usr/lib/expect5.43</command></userinput></screen>
|
---|
[5dd2882] | 84 |
|
---|
| 85 | </sect2>
|
---|
| 86 |
|
---|
| 87 | <sect2>
|
---|
| 88 | <title>Command explanations</title>
|
---|
| 89 |
|
---|
| 90 | <para><parameter>--enable-shared</parameter>: This option enables building the
|
---|
| 91 | shared library.</para>
|
---|
| 92 |
|
---|
| 93 | <para><option>--with-tk=/usr/lib</option>: Use this option to link in the
|
---|
| 94 | <application>Tk</application> library.</para>
|
---|
| 95 |
|
---|
[72d9ade0] | 96 | <para><command>ln -sf ../libexpect5.43.a /usr/lib/expect5.43</command>: This
|
---|
[5dd2882] | 97 | command creates a required link to the static library.</para>
|
---|
| 98 |
|
---|
| 99 | </sect2>
|
---|
| 100 |
|
---|
| 101 | <sect2>
|
---|
| 102 | <title>Configuring <application>Expect</application></title>
|
---|
| 103 |
|
---|
[ffcbd0d] | 104 | <sect3 id="expect-config"><title>Config files</title>
|
---|
[5dd2882] | 105 | <para><filename>$exp_library/expect.rc</filename> and
|
---|
| 106 | <filename>~/.expect.rc</filename></para>
|
---|
[ffcbd0d] | 107 | <indexterm zone="expect expect-config">
|
---|
| 108 | <primary sortas="e-AA.expect.rc">~/.expect.rc</primary></indexterm>
|
---|
| 109 | <indexterm zone="expect expect-config">
|
---|
| 110 | <primary sortas="e-Aexp_library-expect.rc">$exp_library/expect.rc</primary>
|
---|
| 111 | </indexterm>
|
---|
[5dd2882] | 112 | </sect3>
|
---|
| 113 |
|
---|
| 114 | <sect3><title>Configuration Information</title>
|
---|
| 115 |
|
---|
[ffcbd0d] | 116 | <para>Reference the <command>expect</command> man page for information about
|
---|
| 117 | utilizing the <filename>expect.rc</filename> configuration files. Additionally,
|
---|
| 118 | many of the tools contained in the <application>Expect</application> package
|
---|
| 119 | will use their own configuration files. Reference the respective man page, or
|
---|
[5dd2882] | 120 | examine the script directly for configuration file information.</para>
|
---|
| 121 | </sect3>
|
---|
| 122 |
|
---|
| 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2>
|
---|
| 126 | <title>Contents</title>
|
---|
| 127 |
|
---|
[ffcbd0d] | 128 | <segmentedlist>
|
---|
| 129 | <segtitle>Installed Programs</segtitle>
|
---|
| 130 | <segtitle>Installed Library</segtitle>
|
---|
| 131 | <segtitle>Installed Directory</segtitle>
|
---|
| 132 |
|
---|
| 133 | <seglistitem>
|
---|
| 134 | <seg>autoexpect, autopasswd, cryptdir, decryptdir, dislocate, expect, ftp-rfc,
|
---|
| 135 | kibitz, lpunlock, mkpasswd, passmass, rftp, rlogin-cwd, timed-read, timed-run,
|
---|
[d260aaf4] | 136 | unbuffer, weather and optionally (if <application>Expect</application> was
|
---|
[ffcbd0d] | 137 | linked against <application>Tk</application>), expectk, multixterm,
|
---|
| 138 | tknewsbiff, tkpasswd, xkibitz and xpstat</seg>
|
---|
[cf01fa4a] | 139 | <seg>libexpect5.43.[so,a]</seg>
|
---|
| 140 | <seg>/usr/lib/expect5.43</seg>
|
---|
[ffcbd0d] | 141 | </seglistitem>
|
---|
| 142 | </segmentedlist>
|
---|
| 143 |
|
---|
| 144 | <variablelist>
|
---|
| 145 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 146 | <?dbfo list-presentation="list"?>
|
---|
| 147 |
|
---|
| 148 | <varlistentry id="autoexpect">
|
---|
| 149 | <term><command>autoexpect</command></term>
|
---|
| 150 | <listitem><para>generates an <application>Expect</application> script from
|
---|
| 151 | watching a session.</para>
|
---|
| 152 | <indexterm zone="expect autoexpect">
|
---|
| 153 | <primary sortas="b-autoexpect">autoexpect</primary>
|
---|
| 154 | </indexterm></listitem>
|
---|
| 155 | </varlistentry>
|
---|
| 156 |
|
---|
| 157 | <varlistentry id="autopasswd">
|
---|
| 158 | <term><command>autopasswd</command></term>
|
---|
| 159 | <listitem><para>is a wrapper to make <command>passwd</command>(1) be
|
---|
[5dd2882] | 160 | non-interactive.</para>
|
---|
[ffcbd0d] | 161 | <indexterm zone="expect autopasswd">
|
---|
| 162 | <primary sortas="b-autopasswd">autopasswd</primary>
|
---|
| 163 | </indexterm></listitem>
|
---|
| 164 | </varlistentry>
|
---|
| 165 |
|
---|
| 166 | <varlistentry id="cryptdir">
|
---|
| 167 | <term><command>cryptdir</command></term>
|
---|
| 168 | <listitem><para>encrypts all files in a directory.</para>
|
---|
| 169 | <indexterm zone="expect cryptdir">
|
---|
| 170 | <primary sortas="b-cryptdir">cryptdir</primary>
|
---|
| 171 | </indexterm></listitem>
|
---|
| 172 | </varlistentry>
|
---|
| 173 |
|
---|
| 174 | <varlistentry id="decryptdir">
|
---|
| 175 | <term><command>decryptdir</command></term>
|
---|
| 176 | <listitem><para>decrypts all files in a directory.</para>
|
---|
| 177 | <indexterm zone="expect decryptdir">
|
---|
| 178 | <primary sortas="b-decryptdir">decryptdir</primary>
|
---|
| 179 | </indexterm></listitem>
|
---|
| 180 | </varlistentry>
|
---|
| 181 |
|
---|
| 182 | <varlistentry id="dislocate">
|
---|
| 183 | <term><command>dislocate</command></term>
|
---|
| 184 | <listitem><para>allows processes to be disconnected and reconnected to a
|
---|
| 185 | terminal.</para>
|
---|
| 186 | <indexterm zone="expect dislocate">
|
---|
| 187 | <primary sortas="b-dislocate">dislocate</primary>
|
---|
| 188 | </indexterm></listitem>
|
---|
| 189 | </varlistentry>
|
---|
| 190 |
|
---|
| 191 | <varlistentry id="expect-prog">
|
---|
| 192 | <term><command>expect</command></term>
|
---|
| 193 | <listitem><para>is a program that <quote>talks</quote> to other interactive
|
---|
| 194 | programs according to a script.</para>
|
---|
| 195 | <indexterm zone="expect expect-prog">
|
---|
| 196 | <primary sortas="b-expect">expect</primary>
|
---|
| 197 | </indexterm></listitem>
|
---|
| 198 | </varlistentry>
|
---|
| 199 |
|
---|
| 200 | <varlistentry id="ftp-rfc">
|
---|
| 201 | <term><command>ftp-rfc</command></term>
|
---|
| 202 | <listitem><para>retrieves an <acronym>RFC</acronym> (or the index) from
|
---|
| 203 | <acronym>UUNET</acronym>.</para>
|
---|
| 204 | <indexterm zone="expect ftp-rfc">
|
---|
| 205 | <primary sortas="b-ftp-rfc">ftp-rfc</primary>
|
---|
| 206 | </indexterm></listitem>
|
---|
| 207 | </varlistentry>
|
---|
| 208 |
|
---|
| 209 | <varlistentry id="kibitz">
|
---|
| 210 | <term><command>kibitz</command></term>
|
---|
| 211 | <listitem><para>allows two (or more) people to interact with one shell
|
---|
| 212 | (or any arbitrary program).</para>
|
---|
| 213 | <indexterm zone="expect kibitz">
|
---|
| 214 | <primary sortas="b-kibitz">kibitz</primary>
|
---|
| 215 | </indexterm></listitem>
|
---|
| 216 | </varlistentry>
|
---|
| 217 |
|
---|
| 218 | <varlistentry id="lpunlock">
|
---|
| 219 | <term><command>lpunlock</command></term>
|
---|
| 220 | <listitem><para>unhangs a printer which claims it is <quote>waiting for
|
---|
| 221 | lock</quote>.</para>
|
---|
| 222 | <indexterm zone="expect lpunlock">
|
---|
| 223 | <primary sortas="b-lpunlock">lpunlock</primary>
|
---|
| 224 | </indexterm></listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
| 227 | <varlistentry id="mkpasswd">
|
---|
| 228 | <term><command>mkpasswd</command></term>
|
---|
| 229 | <listitem><para>generates passwords and can apply them automatically to
|
---|
| 230 | users.</para>
|
---|
| 231 | <indexterm zone="expect mkpasswd">
|
---|
| 232 | <primary sortas="b-mkpasswd">mkpasswd</primary>
|
---|
| 233 | </indexterm></listitem>
|
---|
| 234 | </varlistentry>
|
---|
| 235 |
|
---|
| 236 | <varlistentry id="passmass">
|
---|
| 237 | <term><command>passmass</command></term>
|
---|
| 238 | <listitem><para>changes a password on multiple machines.</para>
|
---|
| 239 | <indexterm zone="expect passmass">
|
---|
| 240 | <primary sortas="b-passmass">passmass</primary>
|
---|
| 241 | </indexterm></listitem>
|
---|
| 242 | </varlistentry>
|
---|
| 243 |
|
---|
| 244 | <varlistentry id="rftp">
|
---|
| 245 | <term><command>rftp</command></term>
|
---|
| 246 | <listitem><para>is much like <command>ftp</command> except
|
---|
| 247 | it uses <userinput>~g</userinput> and <userinput>~p</userinput> instead of
|
---|
| 248 | <userinput>mget</userinput> and <userinput>mput</userinput>.</para>
|
---|
| 249 | <indexterm zone="expect rftp">
|
---|
| 250 | <primary sortas="b-rftp">rftp</primary>
|
---|
| 251 | </indexterm></listitem>
|
---|
| 252 | </varlistentry>
|
---|
| 253 |
|
---|
| 254 | <varlistentry id="rlogin-cwd">
|
---|
| 255 | <term><command>rlogin-cwd</command></term>
|
---|
| 256 | <listitem><para>is <command>rlogin</command> except it uses the local current
|
---|
| 257 | directory as the current working directory on the remote machine.</para>
|
---|
| 258 | <indexterm zone="expect rlogin-cwd">
|
---|
| 259 | <primary sortas="b-rlogin-cwd">rlogin-cwd</primary>
|
---|
| 260 | </indexterm></listitem>
|
---|
| 261 | </varlistentry>
|
---|
| 262 |
|
---|
| 263 | <varlistentry id="timed-read">
|
---|
| 264 | <term><command>timed-read</command></term>
|
---|
| 265 | <listitem><para> reads a complete line from stdin and aborts after a given
|
---|
| 266 | number of seconds.</para>
|
---|
| 267 | <indexterm zone="expect timed-read">
|
---|
| 268 | <primary sortas="b-timed-read">timed-read</primary>
|
---|
| 269 | </indexterm></listitem>
|
---|
| 270 | </varlistentry>
|
---|
| 271 |
|
---|
| 272 | <varlistentry id="timed-run">
|
---|
| 273 | <term><command>timed-run</command></term>
|
---|
| 274 | <listitem><para>runs a program for a given amount of time.</para>
|
---|
| 275 | <indexterm zone="expect timed-run">
|
---|
| 276 | <primary sortas="b-timed-run">timed-run</primary>
|
---|
| 277 | </indexterm></listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
| 280 | <varlistentry id="unbuffer">
|
---|
| 281 | <term><command>unbuffer</command></term>
|
---|
| 282 | <listitem><para>disables the output buffering that occurs when program output
|
---|
| 283 | is redirected.</para>
|
---|
| 284 | <indexterm zone="expect unbuffer">
|
---|
| 285 | <primary sortas="b-unbuffer">unbuffer</primary>
|
---|
| 286 | </indexterm></listitem>
|
---|
| 287 | </varlistentry>
|
---|
| 288 |
|
---|
| 289 | <varlistentry id="weather">
|
---|
| 290 | <term><command>weather</command></term>
|
---|
| 291 | <listitem><para>retrieves a weather report (courtesy University of Michigan)
|
---|
| 292 | for a given city or geographical area.</para>
|
---|
| 293 | <indexterm zone="expect weather">
|
---|
| 294 | <primary sortas="b-weather">weather</primary>
|
---|
| 295 | </indexterm></listitem>
|
---|
| 296 | </varlistentry>
|
---|
| 297 |
|
---|
| 298 | <varlistentry id="expectk">
|
---|
| 299 | <term><command>expectk</command></term>
|
---|
| 300 | <listitem><para>is a combination of <application>Expect</application> with
|
---|
| 301 | <application>Tk</application> and should run any <command>wish</command> or
|
---|
| 302 | <application>Expect</application> script.</para>
|
---|
| 303 | <indexterm zone="expect expectk">
|
---|
| 304 | <primary sortas="b-expectk">expectk</primary>
|
---|
| 305 | </indexterm></listitem>
|
---|
| 306 | </varlistentry>
|
---|
| 307 |
|
---|
| 308 | <varlistentry id="multixterm">
|
---|
| 309 | <term><command>multixterm</command></term>
|
---|
| 310 | <listitem><para>creates multiple <command>xterm</command>s that can be driven
|
---|
| 311 | together or separately.</para>
|
---|
| 312 | <indexterm zone="expect multixterm">
|
---|
| 313 | <primary sortas="b-multixterm">multixterm</primary>
|
---|
| 314 | </indexterm></listitem>
|
---|
| 315 | </varlistentry>
|
---|
| 316 |
|
---|
| 317 | <varlistentry id="tknewsbiff">
|
---|
| 318 | <term><command>tknewsbiff</command></term>
|
---|
| 319 | <listitem><para>pops up a window when there is unread news in your favorite
|
---|
| 320 | newsgroups and removes the window after you've read the news.</para>
|
---|
| 321 | <indexterm zone="expect tknewsbiff">
|
---|
| 322 | <primary sortas="b-tknewsbiff">tknewsbiff</primary>
|
---|
| 323 | </indexterm></listitem>
|
---|
| 324 | </varlistentry>
|
---|
| 325 |
|
---|
| 326 | <varlistentry id="tkpasswd">
|
---|
| 327 | <term><command>tkpasswd</command></term>
|
---|
| 328 | <listitem><para>is a script to change passwords using
|
---|
[5dd2882] | 329 | <command>expectk</command>.</para>
|
---|
[ffcbd0d] | 330 | <indexterm zone="expect tkpasswd">
|
---|
| 331 | <primary sortas="b-tkpasswd">tkpasswd</primary>
|
---|
| 332 | </indexterm></listitem>
|
---|
| 333 | </varlistentry>
|
---|
| 334 |
|
---|
| 335 | <varlistentry id="xkibitz">
|
---|
| 336 | <term><command>xkibitz</command></term>
|
---|
| 337 | <listitem><para>allows users in separate <command>xterm</command>s to share
|
---|
| 338 | one shell (or any program that runs in an <command>xterm</command>).</para>
|
---|
| 339 | <indexterm zone="expect xkibitz">
|
---|
| 340 | <primary sortas="b-xkibitz">xkibitz</primary>
|
---|
| 341 | </indexterm></listitem>
|
---|
| 342 | </varlistentry>
|
---|
| 343 |
|
---|
| 344 | <varlistentry id="xpstat">
|
---|
| 345 | <term><command>xpstat</command></term>
|
---|
| 346 | <listitem><para>is a script that acts as a front-end for
|
---|
[5dd2882] | 347 | <command>xpilot</command>.</para>
|
---|
[ffcbd0d] | 348 | <indexterm zone="expect xpstat">
|
---|
| 349 | <primary sortas="b-xpstat">xpstat</primary>
|
---|
| 350 | </indexterm></listitem>
|
---|
| 351 | </varlistentry>
|
---|
| 352 |
|
---|
| 353 | <varlistentry id="libexpect">
|
---|
[cf01fa4a] | 354 | <term><filename class='libraryfile'>libexpect5.43.[so,a]</filename></term>
|
---|
[ffcbd0d] | 355 | <listitem><para> contains functions that allow
|
---|
| 356 | <application>Expect</application> to be used as a
|
---|
| 357 | <application>Tcl</application> extension or to be used directly from C or
|
---|
| 358 | C++ (without <application>Tcl</application>).</para>
|
---|
| 359 | <indexterm zone="expect libexpect">
|
---|
[cf01fa4a] | 360 | <primary sortas="c-libexpect5.43">libexpect5.43.[so,a]</primary>
|
---|
[ffcbd0d] | 361 | </indexterm></listitem>
|
---|
| 362 | </varlistentry>
|
---|
| 363 | </variablelist>
|
---|
[5dd2882] | 364 |
|
---|
| 365 | </sect2>
|
---|
| 366 |
|
---|
| 367 | </sect1>
|
---|
| 368 |
|
---|