<?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: Date format within a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336047#M189869</link>
    <description>Simon, You can get the script from these links.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1fb33a7b3682d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1fb33a7b3682d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.cmve.net/~merijn/" target="_blank"&gt;http://www.cmve.net/~merijn/&lt;/A&gt;&lt;BR /&gt;The bottom of the page under "Other ITRC member contibutions".&lt;BR /&gt;&lt;BR /&gt;Also in this thread there is an example right up your alley.&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=144178" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=144178&lt;/A&gt;</description>
    <pubDate>Tue, 20 Jul 2004 05:51:31 GMT</pubDate>
    <dc:creator>Michael Tully</dc:creator>
    <dc:date>2004-07-20T05:51:31Z</dc:date>
    <item>
      <title>Date format within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336044#M189866</link>
      <description>I'm taking today's date (eg 20/07/2004) and formatting it to a filename&lt;BR /&gt;&lt;BR /&gt;example :&lt;BR /&gt;&lt;BR /&gt;filename=`/bin/date +%y%m%d`&lt;BR /&gt;&lt;BR /&gt;Output : 040720 - CORRECT!&lt;BR /&gt;&lt;BR /&gt;However, I need to create a filename which consists of the date 2 DAYS AGO - ie. 040718&lt;BR /&gt;&lt;BR /&gt;How do I amend the example above to say 'today's date minus 2 days' .....&lt;BR /&gt;&lt;BR /&gt;10 points for the first correct answer!&lt;BR /&gt;Simon</description>
      <pubDate>Tue, 20 Jul 2004 05:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336044#M189866</guid>
      <dc:creator>Simon R Wootton</dc:creator>
      <dc:date>2004-07-20T05:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date format within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336045#M189867</link>
      <description>Hi !&lt;BR /&gt;&lt;BR /&gt;Take a look at this one :&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=641246" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=641246&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;(don't want to answer the same twice :)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Jul 2004 05:08:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336045#M189867</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-07-20T05:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date format within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336046#M189868</link>
      <description>I'm not near a system right now, but there is a fantastic tool called 'caljd' by our friend Clay Stephenson. If you use the word 'caljd' in the search engine, there are a pile of examples and in many there is an attachment of the script, which is written in perl. You could write a script and call in Clay's perl script at the appropriate time.</description>
      <pubDate>Tue, 20 Jul 2004 05:16:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336046#M189868</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-07-20T05:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date format within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336047#M189869</link>
      <description>Simon, You can get the script from these links.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1fb33a7b3682d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1fb33a7b3682d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.cmve.net/~merijn/" target="_blank"&gt;http://www.cmve.net/~merijn/&lt;/A&gt;&lt;BR /&gt;The bottom of the page under "Other ITRC member contibutions".&lt;BR /&gt;&lt;BR /&gt;Also in this thread there is an example right up your alley.&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=144178" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=144178&lt;/A&gt;</description>
      <pubDate>Tue, 20 Jul 2004 05:51:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336047#M189869</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-07-20T05:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date format within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336048#M189870</link>
      <description>We can create using shell scipt also. Attached script will do that. Use crontab to run the script everyday after the starting of the day. dayinfo shell variable will contain 2 days back details.&lt;BR /&gt;&lt;BR /&gt; I think i have seen the question today!? okie. see the shell in attachment. it will be useful.</description>
      <pubDate>Tue, 20 Jul 2004 07:40:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336048#M189870</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-07-20T07:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date format within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336049#M189871</link>
      <description>oops. fred ruffet gave that link. :-)</description>
      <pubDate>Tue, 20 Jul 2004 07:43:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336049#M189871</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-07-20T07:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Date format within a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336050#M189872</link>
      <description>This is rather easy but you will need a fairly recent version of caljd.sh (&amp;gt;= 2.22) to truncate to 2-digit years.&lt;BR /&gt;&lt;BR /&gt;PREVDATE=$(caljd.sh -s -y -C $(caljd.sh -p 2))&lt;BR /&gt;&lt;BR /&gt;echo "Two days ago was ${PREVDATE}"&lt;BR /&gt;&lt;BR /&gt;This will work across month and year boundaries as well. &lt;BR /&gt;&lt;BR /&gt;Here is caljd.sh, Version 2.23:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Jul 2004 09:11:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-within-a-script/m-p/3336050#M189872</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-07-20T09:11:45Z</dc:date>
    </item>
  </channel>
</rss>

