<?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: Expect script error--help needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184307#M683012</link>
    <description>I fixed this by inserting sleep in expect responses.</description>
    <pubDate>Tue, 07 Jul 2009 14:30:29 GMT</pubDate>
    <dc:creator>Robert Legatie</dc:creator>
    <dc:date>2009-07-07T14:30:29Z</dc:date>
    <item>
      <title>Expect script error--help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184302#M683007</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have the following expect script for doing sftp. I need to use only expect. Please see the script and error below.&lt;BR /&gt;#!/opt/expect/expect&lt;BR /&gt;set file [lindex $argv 4]&lt;BR /&gt;set directory [lindex $argv 5]&lt;BR /&gt;set action [lindex $argv 6]&lt;BR /&gt; &lt;BR /&gt;set timeout 360&lt;BR /&gt; &lt;BR /&gt;spawn /usr/local/bin/sftp2 $user@$server$port&lt;BR /&gt; &lt;BR /&gt;expect "$user@$server's password"&lt;BR /&gt;&lt;BR /&gt;send "$pword\r"&lt;BR /&gt; &lt;BR /&gt;expect "sftp&amp;gt;"&lt;BR /&gt; &lt;BR /&gt;send "cd $directory\r"&lt;BR /&gt;expect "sftp&amp;gt;"&lt;BR /&gt;&lt;BR /&gt;send "$action $file\r"&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;expect "sftp&amp;gt;"&lt;BR /&gt; &lt;BR /&gt;send "quit\r"&lt;BR /&gt; &lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error:&lt;BR /&gt;send: spawn id exp4 not open&lt;BR /&gt;    while executing&lt;BR /&gt;"send "quit\r""&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Mon, 29 Jun 2009 14:29:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184302#M683007</guid>
      <dc:creator>Robert Legatie</dc:creator>
      <dc:date>2009-06-29T14:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Expect script error--help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184303#M683008</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;I know this is not the answer you seek but you don't need expect to automate sftp.&lt;BR /&gt;&lt;BR /&gt;You can use scp after public key exchange.&lt;BR /&gt;&lt;BR /&gt;Link.&lt;BR /&gt;&lt;A href="http://www.hpux.ws/?p=10" target="_blank"&gt;http://www.hpux.ws/?p=10&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 29 Jun 2009 14:36:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184303#M683008</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-29T14:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Expect script error--help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184304#M683009</link>
      <description>Thanks for the reply. I cannot use keys and sftp is the only option.&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2009 14:53:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184304#M683009</guid>
      <dc:creator>Robert Legatie</dc:creator>
      <dc:date>2009-06-29T14:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Expect script error--help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184305#M683010</link>
      <description>two things (and neither may be of  help):&lt;BR /&gt;&lt;BR /&gt;The @ symbol might be killing the input.  take a look at the output of "stty -a".  you might have to escape it.&lt;BR /&gt;&lt;BR /&gt;and here:&lt;BR /&gt;expect "$user@$server's password"&lt;BR /&gt;&lt;BR /&gt;i'd use &lt;BR /&gt;expect "password"&lt;BR /&gt;&lt;BR /&gt;i don't think you're really getting logged it to begin with&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2009 19:40:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184305#M683010</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-06-29T19:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Expect script error--help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184306#M683011</link>
      <description>it is connection related issue , I recommend read this:maybe it will work for you.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://coding.derkeiler.com/Archive/Tcl/comp.lang.tcl/2005-03/1589.html" target="_blank"&gt;http://coding.derkeiler.com/Archive/Tcl/comp.lang.tcl/2005-03/1589.html&lt;/A&gt;</description>
      <pubDate>Mon, 06 Jul 2009 09:43:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184306#M683011</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-07-06T09:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Expect script error--help needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184307#M683012</link>
      <description>I fixed this by inserting sleep in expect responses.</description>
      <pubDate>Tue, 07 Jul 2009 14:30:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-error-help-needed/m-p/5184307#M683012</guid>
      <dc:creator>Robert Legatie</dc:creator>
      <dc:date>2009-07-07T14:30:29Z</dc:date>
    </item>
  </channel>
</rss>

