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