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