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