<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Expect within a Korn Shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102407#M717486</link>
    <description>Devon&lt;BR /&gt;&lt;BR /&gt;I think you are out of luck.&lt;BR /&gt;Expect can do things that ksh cannot.&lt;BR /&gt;That's why it was created.&lt;BR /&gt;&lt;BR /&gt;Don't take my word for it. Visit &lt;A href="http://expect.nist.gov/" target="_blank"&gt;http://expect.nist.gov/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But if you want to do everything in a single language, maybe Perl ?&lt;BR /&gt;There's bound to be a telnet module for Perl out there.&lt;BR /&gt;&lt;BR /&gt;-- Graham</description>
    <pubDate>Mon, 27 Oct 2003 05:51:30 GMT</pubDate>
    <dc:creator>Graham Cameron_1</dc:creator>
    <dc:date>2003-10-27T05:51:30Z</dc:date>
    <item>
      <title>Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102404#M717483</link>
      <description>Hi&lt;BR /&gt;I've written a korn shell that works OK, but I've now been told that automation of a telnet session is required. Is it possible to write an Expect function which can be called from within the korn shell?</description>
      <pubDate>Sun, 26 Oct 2003 10:16:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102404#M717483</guid>
      <dc:creator>Devon Thomas</dc:creator>
      <dc:date>2003-10-26T10:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102405#M717484</link>
      <description>expect and ksh are syntaxally incompatible (on so many levels), so expect scripting can not be a ksh function.  What you'd do is write your expect script:&lt;BR /&gt;&lt;BR /&gt;#!/dirpath/expect&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;then call that script from within your shell script just like any other executable:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;expectprogram&lt;BR /&gt;if [ "$?" != 0 ] ;then&lt;BR /&gt;error message&lt;BR /&gt;fi&lt;BR /&gt;.&lt;BR /&gt;.</description>
      <pubDate>Sun, 26 Oct 2003 18:43:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102405#M717484</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2003-10-26T18:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102406#M717485</link>
      <description>Thanks Curt. That solves my immediate requirement, but is there a script/tool that can convert an expect script into a korn script :-). i.e. I'd like to use one script rather than several.</description>
      <pubDate>Mon, 27 Oct 2003 05:30:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102406#M717485</guid>
      <dc:creator>Devon Thomas</dc:creator>
      <dc:date>2003-10-27T05:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102407#M717486</link>
      <description>Devon&lt;BR /&gt;&lt;BR /&gt;I think you are out of luck.&lt;BR /&gt;Expect can do things that ksh cannot.&lt;BR /&gt;That's why it was created.&lt;BR /&gt;&lt;BR /&gt;Don't take my word for it. Visit &lt;A href="http://expect.nist.gov/" target="_blank"&gt;http://expect.nist.gov/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But if you want to do everything in a single language, maybe Perl ?&lt;BR /&gt;There's bound to be a telnet module for Perl out there.&lt;BR /&gt;&lt;BR /&gt;-- Graham</description>
      <pubDate>Mon, 27 Oct 2003 05:51:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102407#M717486</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2003-10-27T05:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102408#M717487</link>
      <description>Thanks Graham, but it'd mean learning PERL, which looks like it'd take up more time. &lt;BR /&gt;Think I'l stick to calling expect from from ksh :-).</description>
      <pubDate>Mon, 27 Oct 2003 06:23:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102408#M717487</guid>
      <dc:creator>Devon Thomas</dc:creator>
      <dc:date>2003-10-27T06:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102409#M717488</link>
      <description>Expect is a dialect of "Tcl".You might want to think if Tcl/Tk which has many advantages like being interpreted,object oriented and easily fits in any architecture.&lt;BR /&gt;Using a Tcl shell(tclsh) should solve your problems.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Oct 2003 10:31:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102409#M717488</guid>
      <dc:creator>Paddy_1</dc:creator>
      <dc:date>2003-10-27T10:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102410#M717489</link>
      <description>how easy is it to use expect commands inside a tclsh script...does tcl recognise expect commands or do I have to:&lt;BR /&gt;#! /blah/blah/tclsh&lt;BR /&gt;tcl commands&lt;BR /&gt;expectsctipt (args)&lt;BR /&gt;tcl commands&lt;BR /&gt;exit&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Oct 2003 11:57:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102410#M717489</guid>
      <dc:creator>Devon Thomas</dc:creator>
      <dc:date>2003-10-27T11:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102411#M717490</link>
      <description>Think of expect as a library of "Tcl".&lt;BR /&gt;&lt;BR /&gt;Structurally, Expect is actually an extension to another programming language called Tcl. This means that Expect adds commands and functionality to the Tcl language. It also means that to build and use Expect, you must also obtain and build Tcl. &lt;BR /&gt;&lt;BR /&gt;Conceptually, Expect is a chat script generalized to the entire Unix universe&lt;BR /&gt;&lt;BR /&gt;The book Exploring Expect, by Don Libes (O'Reilly &amp;amp; Associates) is very helpful</description>
      <pubDate>Mon, 27 Oct 2003 12:35:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102411#M717490</guid>
      <dc:creator>Paddy_1</dc:creator>
      <dc:date>2003-10-27T12:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102412#M717491</link>
      <description>Can you use a send &amp;amp; receive? &lt;BR /&gt;&lt;BR /&gt;sndline "cd $files"&lt;BR /&gt;receive "&amp;gt;"&lt;BR /&gt;sndline "ls -l *.LOG"&lt;BR /&gt;receive "&amp;gt;"</description>
      <pubDate>Tue, 28 Oct 2003 07:15:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102412#M717491</guid>
      <dc:creator>Renda Skandier</dc:creator>
      <dc:date>2003-10-28T07:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using Expect within a Korn Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102413#M717492</link>
      <description>K,&lt;BR /&gt;Are these korn commands? I'll give them a try....at the moment I'm writing a korn 'main' script with an expect script 'bolted' onto it. &lt;BR /&gt;Paddy,&lt;BR /&gt;tcl sounds useful for the future, but time contraints are stopping me converting the main script into tcl.&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 28 Oct 2003 18:26:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-expect-within-a-korn-shell-script/m-p/3102413#M717492</guid>
      <dc:creator>Devon Thomas</dc:creator>
      <dc:date>2003-10-28T18:26:23Z</dc:date>
    </item>
  </channel>
</rss>

