<?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: script needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840305#M91051</link>
    <description>Hi Ridzuan,&lt;BR /&gt;&lt;BR /&gt;I have no idea what this script does or whether it *needs* to run in the background - but you ought to ba able to do the following:&lt;BR /&gt;&lt;BR /&gt;su rkat -c "/home/users/reset.sh ; exit"&lt;BR /&gt;&lt;BR /&gt;This will run the script as the rkat user &amp;amp; the exit will not occur until the script returns.&lt;BR /&gt;&lt;BR /&gt;The problem with the wait command is that it needs to work on a PID.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
    <pubDate>Thu, 07 Nov 2002 01:10:17 GMT</pubDate>
    <dc:creator>Jeff Schussele</dc:creator>
    <dc:date>2002-11-07T01:10:17Z</dc:date>
    <item>
      <title>script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840302#M91048</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am using the below script to swtich to another id and run a script.&lt;BR /&gt;&lt;BR /&gt;.....&lt;BR /&gt;(sleep 2&lt;BR /&gt;echo /home/users/reset.sh&lt;BR /&gt;sleep 20&lt;BR /&gt;echo exit) | sw rkat&lt;BR /&gt;......&lt;BR /&gt;&lt;BR /&gt;What the above script does is switch to user rkat and execute reset.sh script.&lt;BR /&gt;&lt;BR /&gt;My problem the reset.sh will terminated after 20 second or depend on the value that assign to sleep. I am hoping the above code will run reset.sh until finish and sleep for 20 second and exit not to exit after 20 second while reset.sh is still running. Since the time taken to run reset.sh can not be determined in advance and I am not able to run the above script (reset.sh) to finish.&lt;BR /&gt;&lt;BR /&gt;Any idea to get around with the problem?&lt;BR /&gt;&lt;BR /&gt;I have tried to use &amp;amp; but still it doesn't help&lt;BR /&gt;&lt;BR /&gt;(sleep 2&lt;BR /&gt;echo "/home/users/reset.sh &amp;amp;"&lt;BR /&gt;sleep 20&lt;BR /&gt;echo exit) | sw rkat&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Nov 2002 23:37:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840302#M91048</guid>
      <dc:creator>Ridzuan Zakaria</dc:creator>
      <dc:date>2002-11-06T23:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840303#M91049</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;You simply need to use wait , instead of sleep. This will wait for process to finish before cotinuing with next task&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 07 Nov 2002 00:00:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840303#M91049</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-11-07T00:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840304#M91050</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have tried you suggestion to use wait instead, somehow it still doesn't work. Probably I didn't do it right. Here is what I did&lt;BR /&gt;&lt;BR /&gt;sleep 2 &lt;BR /&gt;echo "/home/users/reset.sh &amp;amp;" &lt;BR /&gt;wait&lt;BR /&gt;echo exit) | sw rkat &lt;BR /&gt;&lt;BR /&gt;By doing this the script exit immediately.&lt;BR /&gt;&lt;BR /&gt;Please advised&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Nov 2002 00:42:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840304#M91050</guid>
      <dc:creator>Ridzuan Zakaria</dc:creator>
      <dc:date>2002-11-07T00:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840305#M91051</link>
      <description>Hi Ridzuan,&lt;BR /&gt;&lt;BR /&gt;I have no idea what this script does or whether it *needs* to run in the background - but you ought to ba able to do the following:&lt;BR /&gt;&lt;BR /&gt;su rkat -c "/home/users/reset.sh ; exit"&lt;BR /&gt;&lt;BR /&gt;This will run the script as the rkat user &amp;amp; the exit will not occur until the script returns.&lt;BR /&gt;&lt;BR /&gt;The problem with the wait command is that it needs to work on a PID.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Thu, 07 Nov 2002 01:10:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840305#M91051</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-11-07T01:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840306#M91052</link>
      <description>use&lt;BR /&gt;&lt;BR /&gt;su - &lt;USERNAME&gt; -c '&lt;PATH of="" the="" script=""&gt;&lt;/PATH&gt;&lt;BR /&gt;&lt;/USERNAME&gt;</description>
      <pubDate>Thu, 07 Nov 2002 04:46:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/2840306#M91052</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2002-11-07T04:46:16Z</dc:date>
    </item>
  </channel>
</rss>

