<?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: Shell script to generate yesterday date in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513740#M651341</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;yesterday=`TZ=aaa24 date +"%d-%b-%y"` &lt;BR /&gt;echo $yesterday;</description>
    <pubDate>Wed, 14 Oct 2009 05:40:54 GMT</pubDate>
    <dc:creator>Kenan Erdey</dc:creator>
    <dc:date>2009-10-14T05:40:54Z</dc:date>
    <item>
      <title>Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513737#M651338</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;i need to generate the date of yesterday with the following format:&lt;BR /&gt;&lt;BR /&gt;&lt;DAY&gt;-&lt;FIRST 3="" digits="" of="" the="" month=""&gt;-&lt;LAST 2="" digits="" of="" the="" year=""&gt;&lt;BR /&gt;&lt;BR /&gt;like 14-Oct-09&lt;BR /&gt;&lt;BR /&gt;thanks&lt;/LAST&gt;&lt;/FIRST&gt;&lt;/DAY&gt;</description>
      <pubDate>Wed, 14 Oct 2009 05:16:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513737#M651338</guid>
      <dc:creator>Marco_ALT</dc:creator>
      <dc:date>2009-10-14T05:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513738#M651339</link>
      <description>See these threads about getting yesterday:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=541033" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=541033&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=563529" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=563529&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=21953" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=21953&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227549" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227549&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=144178" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=144178&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=9251" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=9251&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=113540" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=113540&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1108220" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1108220&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Use Clay's caljd.sh or caljd.pl.</description>
      <pubDate>Wed, 14 Oct 2009 05:34:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513738#M651339</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-10-14T05:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513739#M651340</link>
      <description>how i can get this scipt&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj-2.3.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Oct 2009 05:38:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513739#M651340</guid>
      <dc:creator>Marco_ALT</dc:creator>
      <dc:date>2009-10-14T05:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513740#M651341</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;yesterday=`TZ=aaa24 date +"%d-%b-%y"` &lt;BR /&gt;echo $yesterday;</description>
      <pubDate>Wed, 14 Oct 2009 05:40:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513740#M651341</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2009-10-14T05:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513741#M651342</link>
      <description>Attached my favorite yesterday shell, you can use it:</description>
      <pubDate>Wed, 14 Oct 2009 06:18:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513741#M651342</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-10-14T06:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513742#M651343</link>
      <description>&amp;gt;how I can get this scipt&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj-2.3.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;There is an older one here:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=21953&amp;amp;admit=109447627+1255504783045+28353475" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=21953&amp;amp;admit=109447627+1255504783045+28353475&lt;/A&gt;</description>
      <pubDate>Wed, 14 Oct 2009 06:23:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513742#M651343</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-10-14T06:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513743#M651344</link>
      <description>Hi,&lt;BR /&gt;Here is the command&lt;BR /&gt;&lt;BR /&gt;$ dt=`TZ=$TZ-24 date '+%d-%b-%y'`;echo $dt&lt;BR /&gt;15-Oct-09&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Wed, 14 Oct 2009 06:54:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513743#M651344</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-10-14T06:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513744#M651345</link>
      <description>Hi again,&lt;BR /&gt;Sorry my previous post is for tomorrows here is the yesterday one&lt;BR /&gt;&lt;BR /&gt;$ date&lt;BR /&gt;Wed Oct 14 03:57:40 EDT 2009&lt;BR /&gt;&lt;BR /&gt;$ dt=`TZ=$TZ+24 date '+%d-%b-%y'`;echo $dt&lt;BR /&gt;13-Oct-09&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Wed, 14 Oct 2009 06:58:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513744#M651345</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-10-14T06:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513745#M651346</link>
      <description>#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;   long t;&lt;BR /&gt;   char buf[256];&lt;BR /&gt;   t=time(0)-24*3600;&lt;BR /&gt;   strftime(buf,255,"%d-%b-%y", localtime(&amp;amp;t));&lt;BR /&gt;   printf("%s\n",buf);&lt;BR /&gt;}&lt;BR /&gt;&lt;/TIME.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Wed, 14 Oct 2009 07:37:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513745#M651346</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-10-14T07:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513746#M651347</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Using the 'TZ" variable and adding or subtracting hours from it only works for UTC time.  &lt;BR /&gt;&lt;BR /&gt;One totally accurate, safe way to do what you want is to use Perl.  For your specification:&lt;BR /&gt;&lt;BR /&gt;# perl -MPOSIX -le 'print strftime "%d-%b-%y",localtime(time-(60*60*24))'&lt;BR /&gt;13-Oct-09&lt;BR /&gt;&lt;BR /&gt;You can use the same formatting directives to the strftime() function that you would use with the 'date' command.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 14 Oct 2009 10:53:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513746#M651347</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-10-14T10:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script to generate yesterday date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513747#M651348</link>
      <description>&amp;gt;Dennis: &amp;gt;how I can get this scipt&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj-2.3.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;needs userid and password !</description>
      <pubDate>Wed, 21 Oct 2009 07:53:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-to-generate-yesterday-date/m-p/4513747#M651348</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-10-21T07:53:16Z</dc:date>
    </item>
  </channel>
</rss>

