<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Case &#187; expect</title>
	<atom:link href="http://case.net.ru/tag/expect/feed/" rel="self" type="application/rss+xml" />
	<link>http://case.net.ru</link>
	<description>Just another technical weblog</description>
	<lastBuildDate>Sun, 29 Jan 2012 08:48:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Автоматизация работы с помощью Expect</title>
		<link>http://case.net.ru/2009/07/06/expect/</link>
		<comments>http://case.net.ru/2009/07/06/expect/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 09:15:25 +0000</pubDate>
		<dc:creator>Case</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[expect]]></category>

		<guid isPermaLink="false">http://case.net.ru/?p=620</guid>
		<description><![CDATA[Expect is a program that performs programmed dialogue with other interactive programs. It is briefly described by its man page, expect(1). It uses pseudo-tty&#8217;s to control the child processes, so it is not affected by programs that refuse to read from stdin or pipes. (eg: passwd(1) etc). WWW: http://expect.nist.gov/ FAQ: http://expect.nist.gov/FAQ.html Установка: $ portinstall expect [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Expect is a program that performs programmed dialogue with other<br />
interactive programs.  It is briefly described by its man page, expect(1).</p>
<p>It uses pseudo-tty&#8217;s to control the child processes, so it is not affected<br />
by programs that refuse to read from stdin or pipes. (eg: passwd(1) etc).</p>
<p>WWW: http://expect.nist.gov/<br />
FAQ: http://expect.nist.gov/FAQ.html</p></blockquote>
<p>Установка:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ portinstall expect</pre></div></div>

<p>Пример скрипта:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/local/bin/expect -f</span>
<span style="color: #000000; font-weight: bold;">set</span> host case.net.ru
&nbsp;
spawn telnet <span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span> <span style="color: #000000;">25</span>
expect <span style="color: #ff0000;">&quot;220 case.net.ru ESMTP Postfix&quot;</span>
send <span style="color: #ff0000;">&quot;EHLO localhost<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span>
expect <span style="color: #ff0000;">&quot;250-case.net.ru&quot;</span>
send <span style="color: #ff0000;">&quot;AUTH PLAIN AHRUAMTIzNDU2<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span>
expect <span style="color: #ff0000;">&quot;235 2.7.0 Authentication successful&quot;</span>
send <span style="color: #ff0000;">&quot;QUIT<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span>
interact</pre></div></div>

<p>Ссылки:</p>
<ul>
<li><a href="http://oreilly.com/catalog/9781565920903/">http://oreilly.com/catalog/9781565920903/</a></li>
<li><a href="http://www.ibm.com/developerworks/ru/library/au-expect/index.html">http://www.ibm.com/developerworks/ru/library/au-expect/index.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://case.net.ru/2009/07/06/expect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
