<?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 Expect program query in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-program-query/m-p/2732120#M836469</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have written a small expect script which runs on A box, it telnets to B box with the given Id/pwd, then it gives control to the user.  The expect program terminates for the following condition&lt;BR /&gt;1. When the user press ctrl+d &lt;BR /&gt;2. When the user type exit&lt;BR /&gt;3. When the user press 1&lt;ENTER key=""&gt; then it tries to kill all the process and then quits the program.&lt;BR /&gt;&lt;BR /&gt;My question:&lt;BR /&gt;&lt;BR /&gt;1. When 1 is pressed it should kill all the process apart from ksh,telnetd &amp;amp; PID.  But I noticed that it executes the ps &amp;amp; grep command on A machine NOT on B.  So, it says the error like "18425: no such process".  How do I kill those process which are running on B box? or else is there any other way to kill all the process without killing explicitily one by one process.&lt;BR /&gt;&lt;BR /&gt;2. When user press 9&lt;ENTER key=""&gt; anywhere (e.g $echo hello9&lt;ENTER key=""&gt;) it tries to kill the process &amp;amp; terminates the program. But it should not happen like this, so how can I modify the program to avoid this condition or else is there any other command to handle this?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Vasu&lt;/ENTER&gt;&lt;/ENTER&gt;&lt;/ENTER&gt;</description>
    <pubDate>Mon, 27 May 2002 13:31:46 GMT</pubDate>
    <dc:creator>Vasudevan MV</dc:creator>
    <dc:date>2002-05-27T13:31:46Z</dc:date>
    <item>
      <title>Expect program query</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-program-query/m-p/2732120#M836469</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have written a small expect script which runs on A box, it telnets to B box with the given Id/pwd, then it gives control to the user.  The expect program terminates for the following condition&lt;BR /&gt;1. When the user press ctrl+d &lt;BR /&gt;2. When the user type exit&lt;BR /&gt;3. When the user press 1&lt;ENTER key=""&gt; then it tries to kill all the process and then quits the program.&lt;BR /&gt;&lt;BR /&gt;My question:&lt;BR /&gt;&lt;BR /&gt;1. When 1 is pressed it should kill all the process apart from ksh,telnetd &amp;amp; PID.  But I noticed that it executes the ps &amp;amp; grep command on A machine NOT on B.  So, it says the error like "18425: no such process".  How do I kill those process which are running on B box? or else is there any other way to kill all the process without killing explicitily one by one process.&lt;BR /&gt;&lt;BR /&gt;2. When user press 9&lt;ENTER key=""&gt; anywhere (e.g $echo hello9&lt;ENTER key=""&gt;) it tries to kill the process &amp;amp; terminates the program. But it should not happen like this, so how can I modify the program to avoid this condition or else is there any other command to handle this?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Vasu&lt;/ENTER&gt;&lt;/ENTER&gt;&lt;/ENTER&gt;</description>
      <pubDate>Mon, 27 May 2002 13:31:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-program-query/m-p/2732120#M836469</guid>
      <dc:creator>Vasudevan MV</dc:creator>
      <dc:date>2002-05-27T13:31:46Z</dc:date>
    </item>
  </channel>
</rss>

