<?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: check date in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148150#M454036</link>
    <description>thx reply,&lt;BR /&gt;&lt;BR /&gt;I changed today as 31Dec and the script as below .&lt;BR /&gt;&lt;BR /&gt;=================================&lt;BR /&gt;if [[ $(cal) = *$(date +%d) ]]; &lt;BR /&gt;echo testing&lt;BR /&gt;  case $(date $b) in&lt;BR /&gt;   Jan|May|Jul) echo test1 ;;&lt;BR /&gt;   Feb|Mar|Dec) echo test2 ;;&lt;BR /&gt;&lt;BR /&gt;   esac&lt;BR /&gt;fi&lt;BR /&gt;==================================&lt;BR /&gt;&lt;BR /&gt;The output is "testing" only ,&lt;BR /&gt;I think it check today is last day , but do not recognize this month is Dec , can advise how to change it ? thx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 30 Dec 2008 09:24:59 GMT</pubDate>
    <dc:creator>heaman1</dc:creator>
    <dc:date>2008-12-30T09:24:59Z</dc:date>
    <item>
      <title>check date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148148#M454034</link>
      <description>I would like to write a script as below , can advise what can i do .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if this month is Jan , May , July and today is last day of month ( 28th, 29th , 30th or 31th )&lt;BR /&gt;&lt;BR /&gt;then do xxx&lt;BR /&gt;&lt;BR /&gt;if this month is Feb , Mar , Aug and today is last day of month ( 28th, 29th , 30th or 31th )&lt;BR /&gt;&lt;BR /&gt;then do yyy&lt;BR /&gt;&lt;BR /&gt;end. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;can advise how to write this script ? thx</description>
      <pubDate>Tue, 30 Dec 2008 04:16:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148148#M454034</guid>
      <dc:creator>heaman1</dc:creator>
      <dc:date>2008-12-30T04:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: check date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148149#M454035</link>
      <description>&lt;!--!*#--&gt;You can use Arturo's trick to find the last day of the month:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1158441" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1158441&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;if [[ $(cal) = *$(date +%d) ]]; then # last day of month&lt;BR /&gt;   case $(date $b) in&lt;BR /&gt;   Jan|May|Jul) xxx;;&lt;BR /&gt;   Feb|Mar|Aug) yyy;;&lt;BR /&gt;   esac&lt;BR /&gt;fi</description>
      <pubDate>Tue, 30 Dec 2008 07:45:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148149#M454035</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-30T07:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: check date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148150#M454036</link>
      <description>thx reply,&lt;BR /&gt;&lt;BR /&gt;I changed today as 31Dec and the script as below .&lt;BR /&gt;&lt;BR /&gt;=================================&lt;BR /&gt;if [[ $(cal) = *$(date +%d) ]]; &lt;BR /&gt;echo testing&lt;BR /&gt;  case $(date $b) in&lt;BR /&gt;   Jan|May|Jul) echo test1 ;;&lt;BR /&gt;   Feb|Mar|Dec) echo test2 ;;&lt;BR /&gt;&lt;BR /&gt;   esac&lt;BR /&gt;fi&lt;BR /&gt;==================================&lt;BR /&gt;&lt;BR /&gt;The output is "testing" only ,&lt;BR /&gt;I think it check today is last day , but do not recognize this month is Dec , can advise how to change it ? thx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Dec 2008 09:24:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148150#M454036</guid>
      <dc:creator>heaman1</dc:creator>
      <dc:date>2008-12-30T09:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: check date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148151#M454037</link>
      <description>The folowing will work for most shells&lt;BR /&gt;&lt;BR /&gt;case $(date |awk '{ print $2 } ' ) in&lt;BR /&gt;Jan|May|Jul) echo test1 ;;&lt;BR /&gt;Feb|Mar|Dec) echo test2 ;;&lt;BR /&gt;esac</description>
      <pubDate>Tue, 30 Dec 2008 09:36:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148151#M454037</guid>
      <dc:creator>F Verschuren</dc:creator>
      <dc:date>2008-12-30T09:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: check date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148152#M454038</link>
      <description>&lt;!--!*#--&gt;&amp;gt;The output is "testing" only, but do not recognize this month is Dec&lt;BR /&gt;&lt;BR /&gt;Oops, a typo, $b vs %b:&lt;BR /&gt;if [[ $(cal) = *$(date +%d) ]]; then # last day of month&lt;BR /&gt;   case $(date %b) in&lt;BR /&gt;   Jan|May|Jul) test1;;&lt;BR /&gt;   Feb|Mar|Aug) test2;;&lt;BR /&gt;   esac&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&amp;gt;F Verschuren: The following will work for most shells&lt;BR /&gt;&lt;BR /&gt;Why would you want to use awk(1) if date(1) will do the right thing, if you do it right.  :-)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Dec 2008 10:07:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148152#M454038</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-30T10:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: check date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148153#M454039</link>
      <description>Oops again, that should be:&lt;BR /&gt;case $(date +%b) in</description>
      <pubDate>Tue, 30 Dec 2008 10:09:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148153#M454039</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-30T10:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: check date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148154#M454040</link>
      <description>thx all .</description>
      <pubDate>Tue, 30 Dec 2008 10:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-date/m-p/5148154#M454040</guid>
      <dc:creator>heaman1</dc:creator>
      <dc:date>2008-12-30T10:43:08Z</dc:date>
    </item>
  </channel>
</rss>

