<?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: ksh script - echo to screen even though app is not done in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375253#M684680</link>
    <description>Before simply deleting the "&amp;amp;" in the shutdown script, is this an application with lots of processes?&lt;BR /&gt;&lt;BR /&gt;The shutdown script may separately end these processes and removing the "&amp;amp;" will make the script wait for each single process to end before stopping the next process. This could seriously slow the whole process.&lt;BR /&gt;&lt;BR /&gt;A loop in the monitoring script would definitely be better in this case.</description>
    <pubDate>Tue, 10 Mar 2009 04:37:10 GMT</pubDate>
    <dc:creator>Mark McDonald_2</dc:creator>
    <dc:date>2009-03-10T04:37:10Z</dc:date>
    <item>
      <title>ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375250#M684677</link>
      <description>I have a script that calls different commands.&lt;BR /&gt;And writes to screen.&lt;BR /&gt;&lt;BR /&gt;But the first command, takes about 2 minutes to run, and the script goes on to the next two commands.&lt;BR /&gt;&lt;BR /&gt;I want it to wait until the first command to finish before it goes on to the next, and echo it to the screen.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh -p&lt;BR /&gt;&lt;BR /&gt;# Stop the  application commands:&lt;BR /&gt;echo Disabling xxx application...&lt;BR /&gt;/opt/app/application/shutdown&lt;BR /&gt;(here is where I want it to wait, or maybe output # every 10 seconds...)&lt;BR /&gt;echo xxx application -- disabled&lt;BR /&gt;echo&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo Disabling yyy application...&lt;BR /&gt;/opt/app/application2/stopapp&lt;BR /&gt;echo yyy application -- disabled&lt;BR /&gt;echo</description>
      <pubDate>Tue, 10 Mar 2009 01:39:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375250#M684677</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2009-03-10T01:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375251#M684678</link>
      <description>What is in this script:&lt;BR /&gt;/opt/app/application/shutdown&lt;BR /&gt;&lt;BR /&gt;Maybe this fires off some background shutdowns and return to you before it is complete.&lt;BR /&gt;&lt;BR /&gt;One method would be to loop and monitor for the processes that are shutting down. Check every 10 seconds and echo the "#" then exit the loop once the processes are gone.&lt;BR /&gt;&lt;BR /&gt;good luck</description>
      <pubDate>Tue, 10 Mar 2009 02:01:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375251#M684678</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2009-03-10T02:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375252#M684679</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;As per your script every thing are looks ok. Check your â  /opt/app/application/shutdownâ   script&lt;BR /&gt;if your /opt/app/application/shutdown script is having any &amp;amp; which means run the job in background and execute the next line.&lt;BR /&gt;So check your /opt/app/application/shutdown script and delete the &amp;amp; &lt;BR /&gt;&lt;BR /&gt;Suraj&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Mar 2009 03:54:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375252#M684679</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-03-10T03:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375253#M684680</link>
      <description>Before simply deleting the "&amp;amp;" in the shutdown script, is this an application with lots of processes?&lt;BR /&gt;&lt;BR /&gt;The shutdown script may separately end these processes and removing the "&amp;amp;" will make the script wait for each single process to end before stopping the next process. This could seriously slow the whole process.&lt;BR /&gt;&lt;BR /&gt;A loop in the monitoring script would definitely be better in this case.</description>
      <pubDate>Tue, 10 Mar 2009 04:37:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375253#M684680</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2009-03-10T04:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375254#M684681</link>
      <description>if you know the pid of your application and want to check it is still there you can use&lt;BR /&gt;while :&lt;BR /&gt;do&lt;BR /&gt;kill -0 $pid 2&amp;gt;/dev/null||break&lt;BR /&gt;sleep 1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kill -0 fails if the process doesn't exist anymore</description>
      <pubDate>Tue, 10 Mar 2009 08:09:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375254#M684681</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-03-10T08:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375255#M684682</link>
      <description>Ratzie&lt;BR /&gt;&lt;BR /&gt;Has this helped? How about some points?</description>
      <pubDate>Tue, 10 Mar 2009 22:49:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375255#M684682</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2009-03-10T22:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375256#M684683</link>
      <description>I was looking at possibly...&lt;BR /&gt;while&lt;BR /&gt;do&lt;BR /&gt;ps -ef|grep app&lt;BR /&gt;echo #&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;But I dont know the syntax....</description>
      <pubDate>Tue, 10 Mar 2009 23:45:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375256#M684683</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2009-03-10T23:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375257#M684684</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I was looking at possibly...&lt;BR /&gt;&amp;gt; while&lt;BR /&gt;&amp;gt; do&lt;BR /&gt;&amp;gt; ps -ef|grep app&lt;BR /&gt;&amp;gt; echo #&lt;BR /&gt;&amp;gt; done&lt;BR /&gt;&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;    PID=$(UNIX95= ps -C app -o pid=)&lt;BR /&gt;    echo "I see ${PID}"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Note the whitespace after UNIX95= . This keeps the setting only for the duration of the command line so that it only applies to the 'ps'.   The 'pid=' argument says to suppress a header line and just report the process (if any) whose basename matches "app".  This is the truly safe way to find a process by name in HP-UX.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Mar 2009 23:54:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375257#M684684</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-03-10T23:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: ksh script - echo to screen even though app is not done</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375258#M684685</link>
      <description>Hello Ratzie,&lt;BR /&gt;&lt;BR /&gt;Try this following :&lt;BR /&gt;&lt;BR /&gt;PID=`/opt/app/application/shutdown &amp;amp;`&lt;BR /&gt;wait $PID&lt;BR /&gt;&lt;BR /&gt;At this step you script will wait until detached process shudown ends.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Roland</description>
      <pubDate>Wed, 11 Mar 2009 11:18:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-echo-to-screen-even-though-app-is-not-done/m-p/4375258#M684685</guid>
      <dc:creator>Roland Piette</dc:creator>
      <dc:date>2009-03-11T11:18:40Z</dc:date>
    </item>
  </channel>
</rss>

