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