<?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: Facing problem in Expect scripting. &amp;lt;Suggest any alternative to Sleep command&amp;gt; in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/facing-problem-in-expect-scripting-lt-suggest-any-alternative-to/m-p/4367109#M61155</link>
    <description>&lt;!--!*#--&gt;&amp;gt; [...] automate the BACKUP/RESTORE system&lt;BR /&gt;&amp;gt; disk on the OpenVMS.&lt;BR /&gt;&lt;BR /&gt;What is there to automate?  One BACKUP&lt;BR /&gt;command?  Why sleep for any particular amount&lt;BR /&gt;of time?  Why not simply wait for the command&lt;BR /&gt;to finish (and the next prompt to appear)?&lt;BR /&gt;&lt;BR /&gt;Is there some actual problem which you are&lt;BR /&gt;trying to solve?&lt;BR /&gt;&lt;BR /&gt;(Or will your script load a second tape into&lt;BR /&gt;the tape drive when the first one is full?)&lt;BR /&gt;&lt;BR /&gt;You're connected to the VMS system how,&lt;BR /&gt;exactly?  Serial line, Telnet/rsh/ssh, what?</description>
    <pubDate>Thu, 26 Feb 2009 13:41:32 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2009-02-26T13:41:32Z</dc:date>
    <item>
      <title>Facing problem in Expect scripting. &lt;Suggest any alternative to Sleep command&gt;</title>
      <link>https://community.hpe.com/t5/operating-system-linux/facing-problem-in-expect-scripting-lt-suggest-any-alternative-to/m-p/4367108#M61154</link>
      <description>&lt;!--!*#--&gt;I am writing an expect script (executing on linux) to automate the BACKUP/RESTORE system disk on the OpenVMS.&lt;BR /&gt;&lt;BR /&gt;------------------------------------------&lt;BR /&gt;i.e below piece of code works properly if the sleep time provided is sufficient to complete BACKUP/RESTORE.&lt;BR /&gt;&lt;BR /&gt;send "Backup ...\r"&lt;BR /&gt;sleep sleep_time&lt;BR /&gt;expect -re $R_prompt&lt;BR /&gt;&lt;BR /&gt;------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Time to complete the execution of command varies based on the size of data. So there may be head ache of calculatin exact time required for the execution. (if sleep time provided is less than the time required for execution, then the expect fails..)&lt;BR /&gt;&lt;BR /&gt;So is there any alternative way for this. I even tried with while{} loop which fails to break after execution (as below),&lt;BR /&gt;&lt;BR /&gt;------------------------------------&lt;BR /&gt;send "BACKUP/IMAGE ...\r"&lt;BR /&gt;while {1} {&lt;BR /&gt;          expect {&lt;BR /&gt;               -re $R_prompt {&lt;BR /&gt;                          break;&lt;BR /&gt;                 }&lt;BR /&gt;          }&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;------------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Feb 2009 10:19:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/facing-problem-in-expect-scripting-lt-suggest-any-alternative-to/m-p/4367108#M61154</guid>
      <dc:creator>Suresh Hegde</dc:creator>
      <dc:date>2009-02-26T10:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Facing problem in Expect scripting. &lt;Suggest any alternative to Sleep command&gt;</title>
      <link>https://community.hpe.com/t5/operating-system-linux/facing-problem-in-expect-scripting-lt-suggest-any-alternative-to/m-p/4367109#M61155</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] automate the BACKUP/RESTORE system&lt;BR /&gt;&amp;gt; disk on the OpenVMS.&lt;BR /&gt;&lt;BR /&gt;What is there to automate?  One BACKUP&lt;BR /&gt;command?  Why sleep for any particular amount&lt;BR /&gt;of time?  Why not simply wait for the command&lt;BR /&gt;to finish (and the next prompt to appear)?&lt;BR /&gt;&lt;BR /&gt;Is there some actual problem which you are&lt;BR /&gt;trying to solve?&lt;BR /&gt;&lt;BR /&gt;(Or will your script load a second tape into&lt;BR /&gt;the tape drive when the first one is full?)&lt;BR /&gt;&lt;BR /&gt;You're connected to the VMS system how,&lt;BR /&gt;exactly?  Serial line, Telnet/rsh/ssh, what?</description>
      <pubDate>Thu, 26 Feb 2009 13:41:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/facing-problem-in-expect-scripting-lt-suggest-any-alternative-to/m-p/4367109#M61155</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-02-26T13:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Facing problem in Expect scripting. &lt;Suggest any alternative to Sleep command&gt;</title>
      <link>https://community.hpe.com/t5/operating-system-linux/facing-problem-in-expect-scripting-lt-suggest-any-alternative-to/m-p/4367110#M61156</link>
      <description>My problem is not at the VMS end, but at the linux Expect scripting.&lt;BR /&gt;&lt;BR /&gt;"(Other than using sleep method)How to wait for the sent command for long time (may be more than an hour)? "&lt;BR /&gt;&lt;BR /&gt;I am connecting to VMS from linux box  through telnet (to be specific, using expect script on linux). &lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Suresh</description>
      <pubDate>Mon, 02 Mar 2009 11:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/facing-problem-in-expect-scripting-lt-suggest-any-alternative-to/m-p/4367110#M61156</guid>
      <dc:creator>Suresh Hegde</dc:creator>
      <dc:date>2009-03-02T11:23:20Z</dc:date>
    </item>
  </channel>
</rss>

