<?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: Scripting question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455375#M12316</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Just before your loop, you could spawn a child process consisting of a single sleep&lt;BR /&gt;followed with a line like the following&lt;BR /&gt;kill -USR1 $PPID.&lt;BR /&gt;&lt;BR /&gt;If your parent program traps the USR1 signal,&lt;BR /&gt;it can keep on running as long as the&lt;BR /&gt;kill isn't issued by the child and then&lt;BR /&gt;do whatever is needed, for example exit from&lt;BR /&gt;a loop.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dan</description>
    <pubDate>Fri, 20 Oct 2000 04:34:46 GMT</pubDate>
    <dc:creator>Dan Hetzel</dc:creator>
    <dc:date>2000-10-20T04:34:46Z</dc:date>
    <item>
      <title>Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455372#M12313</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is it possible to have a timer control in a script within a while true loop to stop it from execution. Cron job will use to start the script.&lt;BR /&gt;&lt;BR /&gt;If so, how should be the syntax like.&lt;BR /&gt;&lt;BR /&gt;i.e.&lt;BR /&gt;while (08:00 &amp;lt; time &amp;lt; 19:00)&lt;BR /&gt;do&lt;BR /&gt;...&lt;BR /&gt;sleep 5&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;YC</description>
      <pubDate>Thu, 19 Oct 2000 05:26:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455372#M12313</guid>
      <dc:creator>yc_2</dc:creator>
      <dc:date>2000-10-19T05:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455373#M12314</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can do it, but it is not as simple as your code.&lt;BR /&gt;&lt;BR /&gt;By using the date command with format specifiers, you can easily retrieve the hour and minutes.&lt;BR /&gt;&lt;BR /&gt;HOUR=$(date +"%H")&lt;BR /&gt;&lt;BR /&gt;if [[ ${HOUR} -lt 15 &amp;amp;&amp;amp; ${HOUR} -gt 8 ]]&lt;BR /&gt;then&lt;BR /&gt;  # do whatever it is you want to do between 8 and 15&lt;BR /&gt;else&lt;BR /&gt;  # do something else&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Rik.</description>
      <pubDate>Thu, 19 Oct 2000 05:30:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455373#M12314</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2000-10-19T05:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455374#M12315</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;In case of a while construction, this would be:&lt;BR /&gt;&lt;BR /&gt;HOUR=$(date +"%H") &lt;BR /&gt;&lt;BR /&gt;while [[ ${HOUR} -lt 15 &amp;amp;&amp;amp; ${HOUR} -gt 8 ]] &lt;BR /&gt;do &lt;BR /&gt;    # do whatever it is you want to do between 8 and 15 &lt;BR /&gt;    HOUR=$(date +"%H") &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik.</description>
      <pubDate>Thu, 19 Oct 2000 05:32:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455374#M12315</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2000-10-19T05:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455375#M12316</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Just before your loop, you could spawn a child process consisting of a single sleep&lt;BR /&gt;followed with a line like the following&lt;BR /&gt;kill -USR1 $PPID.&lt;BR /&gt;&lt;BR /&gt;If your parent program traps the USR1 signal,&lt;BR /&gt;it can keep on running as long as the&lt;BR /&gt;kill isn't issued by the child and then&lt;BR /&gt;do whatever is needed, for example exit from&lt;BR /&gt;a loop.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dan</description>
      <pubDate>Fri, 20 Oct 2000 04:34:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2455375#M12316</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2000-10-20T04:34:46Z</dc:date>
    </item>
  </channel>
</rss>

