<?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: Last Sunday of the month with awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163541#M664641</link>
    <description>But this *is* shell script:&lt;BR /&gt;&lt;BR /&gt;cal|awk 'END{print DAY};{if (NF&amp;lt;1) {next};DAY=$NF}'&lt;BR /&gt;&lt;BR /&gt;Piping output of cal into awk...&lt;BR /&gt;&lt;BR /&gt;anyway if you want a quick and dirty method of doing this I guess something like:&lt;BR /&gt;&lt;BR /&gt;cal | awk '{ print $6 }' | sed /^$/d | tail -1&lt;BR /&gt;&lt;BR /&gt;would work for Friday, and obviously:&lt;BR /&gt;&lt;BR /&gt;cal | awk '{ print $1 }' | sed /^$/d | tail -1&lt;BR /&gt;&lt;BR /&gt;for Sunday&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
    <pubDate>Sun, 15 Mar 2009 11:45:02 GMT</pubDate>
    <dc:creator>Duncan Edmonstone</dc:creator>
    <dc:date>2009-03-15T11:45:02Z</dc:date>
    <item>
      <title>Last Sunday of the month with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163538#M664638</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;this is how to get last day of the month:&lt;BR /&gt;cal|awk 'END{print DAY};{if (NF&amp;lt;1) {next};DAY=$NF}'&lt;BR /&gt;&lt;BR /&gt;Is there a similar way to get the last Sunday and last Friday of the month? Thanks in advance.</description>
      <pubDate>Sun, 15 Mar 2009 10:35:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163538#M664638</guid>
      <dc:creator>wojtek75</dc:creator>
      <dc:date>2009-03-15T10:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Last Sunday of the month with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163539#M664639</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;The right tool for the right job.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mirrors.develooper.com/hpux/caljd-2.25.sh" target="_blank"&gt;http://mirrors.develooper.com/hpux/caljd-2.25.sh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mirrors.develooper.com/hpux/caljd-2.2.pl" target="_blank"&gt;http://mirrors.develooper.com/hpux/caljd-2.2.pl&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 15 Mar 2009 10:39:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163539#M664639</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-03-15T10:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Last Sunday of the month with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163540#M664640</link>
      <description>Thanks, but I need it for production machine in a corporation. A lot of compliance problems with a new scripts there and your advice is not feasible for me, but thanks. &lt;BR /&gt;&lt;BR /&gt;What about awk version? No chance to do it that way?</description>
      <pubDate>Sun, 15 Mar 2009 10:44:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163540#M664640</guid>
      <dc:creator>wojtek75</dc:creator>
      <dc:date>2009-03-15T10:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Last Sunday of the month with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163541#M664641</link>
      <description>But this *is* shell script:&lt;BR /&gt;&lt;BR /&gt;cal|awk 'END{print DAY};{if (NF&amp;lt;1) {next};DAY=$NF}'&lt;BR /&gt;&lt;BR /&gt;Piping output of cal into awk...&lt;BR /&gt;&lt;BR /&gt;anyway if you want a quick and dirty method of doing this I guess something like:&lt;BR /&gt;&lt;BR /&gt;cal | awk '{ print $6 }' | sed /^$/d | tail -1&lt;BR /&gt;&lt;BR /&gt;would work for Friday, and obviously:&lt;BR /&gt;&lt;BR /&gt;cal | awk '{ print $1 }' | sed /^$/d | tail -1&lt;BR /&gt;&lt;BR /&gt;for Sunday&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Sun, 15 Mar 2009 11:45:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163541#M664641</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2009-03-15T11:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Last Sunday of the month with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163542#M664642</link>
      <description>Thanks, this is what I was expecting for.</description>
      <pubDate>Sun, 15 Mar 2009 11:50:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-sunday-of-the-month-with-awk/m-p/5163542#M664642</guid>
      <dc:creator>wojtek75</dc:creator>
      <dc:date>2009-03-15T11:50:06Z</dc:date>
    </item>
  </channel>
</rss>

