<?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 question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062275#M138979</link>
    <description>Hi Jeff,&lt;BR /&gt;&lt;BR /&gt;Could you elaborate a bit more on what you are trying to achieve.  I don't fully understand.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tim</description>
    <pubDate>Wed, 03 Sep 2003 09:17:26 GMT</pubDate>
    <dc:creator>Tim Adamson_1</dc:creator>
    <dc:date>2003-09-03T09:17:26Z</dc:date>
    <item>
      <title>Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062273#M138977</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Can anybody tell me how to determine from a day of the week output, how I may classify this as an A cycle, B cycle or C cycle assuming each cycle is of duration 7 days ?</description>
      <pubDate>Wed, 03 Sep 2003 09:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062273#M138977</guid>
      <dc:creator>Jeff Picton</dc:creator>
      <dc:date>2003-09-03T09:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062274#M138978</link>
      <description>date +%j will tell you the day number in the year&lt;BR /&gt;% is the modulus operator&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;TODAY=$(date +%j)&lt;BR /&gt;let CYCLE=$TODAY%21&lt;BR /&gt;case $CYCLE in&lt;BR /&gt;0|1|2|3|4|5|6) echo "Cycle A";;&lt;BR /&gt;7|8|9|10|11|12|13) echo "Cycle B";;&lt;BR /&gt;14|15|16|17|18|19|20) echo "Cycle C";;&lt;BR /&gt;esac;&lt;BR /&gt;&lt;BR /&gt;The only problem in on year-change, since the count is resetted to 0.&lt;BR /&gt;&lt;BR /&gt;But maybe you can cope with it, or write additional code to keep track of the last cycle and change the script itself.&lt;BR /&gt;&lt;BR /&gt;   Massimo&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Sep 2003 09:14:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062274#M138978</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-09-03T09:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062275#M138979</link>
      <description>Hi Jeff,&lt;BR /&gt;&lt;BR /&gt;Could you elaborate a bit more on what you are trying to achieve.  I don't fully understand.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Wed, 03 Sep 2003 09:17:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062275#M138979</guid>
      <dc:creator>Tim Adamson_1</dc:creator>
      <dc:date>2003-09-03T09:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062276#M138980</link>
      <description>Hi Tim&lt;BR /&gt;&lt;BR /&gt;I have a script caljd which calculates the julian day :-&lt;BR /&gt;&lt;BR /&gt;caljd.sh -D -p 1&lt;BR /&gt;02&lt;BR /&gt;&lt;BR /&gt;so day_of_week='caljd.sh -D -p 1' gives 02. &lt;BR /&gt;&lt;BR /&gt;From this I need to use a case statement similar to that of Massimo to determine if this is cycle A B or C.&lt;BR /&gt;&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 03 Sep 2003 09:39:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3062276#M138980</guid>
      <dc:creator>Jeff Picton</dc:creator>
      <dc:date>2003-09-03T09:39:52Z</dc:date>
    </item>
  </channel>
</rss>

