<?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 date/time script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377572#M713722</link>
    <description>Can someone please tell me how to code the following in a shell script.  this needs to execute from inside another script(i.e not via cron)&lt;BR /&gt;&lt;BR /&gt;If monday - Thursday execute script 1&lt;BR /&gt;&lt;BR /&gt;else if friday execute script 2.</description>
    <pubDate>Mon, 13 Sep 2004 05:00:02 GMT</pubDate>
    <dc:creator>Ian_77</dc:creator>
    <dc:date>2004-09-13T05:00:02Z</dc:date>
    <item>
      <title>date/time script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377572#M713722</link>
      <description>Can someone please tell me how to code the following in a shell script.  this needs to execute from inside another script(i.e not via cron)&lt;BR /&gt;&lt;BR /&gt;If monday - Thursday execute script 1&lt;BR /&gt;&lt;BR /&gt;else if friday execute script 2.</description>
      <pubDate>Mon, 13 Sep 2004 05:00:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377572#M713722</guid>
      <dc:creator>Ian_77</dc:creator>
      <dc:date>2004-09-13T05:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: date/time script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377573#M713723</link>
      <description>WeekDay=`date %+w`&lt;BR /&gt;if [ $WeekDay -ge 1 -a $WeekDay -le 4 ]&lt;BR /&gt;then&lt;BR /&gt;  script1&lt;BR /&gt;else&lt;BR /&gt;  if [ $WeekDay -eq 5 ]&lt;BR /&gt;  then&lt;BR /&gt;    script2&lt;BR /&gt;  fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;...could be simplier with case, but this came first to me :)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Sep 2004 05:22:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377573#M713723</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-09-13T05:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: date/time script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377574#M713724</link>
      <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;With the "date +%u" you get the day of the week. Monday is 1, Tuesday is 2 ..... Sunday is 7.&lt;BR /&gt;&lt;BR /&gt;MB.</description>
      <pubDate>Mon, 13 Sep 2004 05:23:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377574#M713724</guid>
      <dc:creator>Marcel Boogert_1</dc:creator>
      <dc:date>2004-09-13T05:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: date/time script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377575#M713725</link>
      <description>We can do this as,&lt;BR /&gt;&lt;BR /&gt;# Get day information&lt;BR /&gt;Day=$(date +'%a')&lt;BR /&gt;&lt;BR /&gt;if [[ "$Day" = "Mon" || "$Day" = "Thu" ]]&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt; # Execute script 1&lt;BR /&gt; &lt;BR /&gt;elif [[ "$Day" = "Fri" ]]&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt; # Execute script 2&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Muthu</description>
      <pubDate>Mon, 13 Sep 2004 07:09:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377575#M713725</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-13T07:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: date/time script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377576#M713726</link>
      <description>Their is a nifty tool by Clay called "caljd" for doing date calculations.&lt;BR /&gt; &lt;BR /&gt;Check this thread...&lt;BR /&gt; &lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x1fb33a7b3682d611abdb0090277a778c%2C00.html&amp;amp;admit=716493758+1095084205608+28353475" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x1fb33a7b3682d611abdb0090277a778c%2C00.html&amp;amp;admit=716493758+1095084205608+28353475&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 13 Sep 2004 09:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-time-script/m-p/3377576#M713726</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-09-13T09:06:49Z</dc:date>
    </item>
  </channel>
</rss>

