<?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: datecalc - utility in Linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708671#M53739</link>
    <description>&lt;P&gt;&amp;gt;I tried to use the caljd.sh in Linux,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the perl version as it should be more portable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also ran into the lack of -Z in typeset when I ported a script to bash.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jul 2012 21:10:01 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2012-07-02T21:10:01Z</dc:date>
    <item>
      <title>datecalc -utility in unix</title>
      <link>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708613#M53735</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;We have a script from hp-ux and needs to be migrate to linux&amp;nbsp; (redhat )platform,&lt;/P&gt;&lt;P&gt;The existing script in hp-ux is using maestro job scheduler ,&amp;nbsp; and using an utility called datecalc ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However on linux side it will not be used maestro application , so the datecalc program is not there .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is from the hp-ux system:&amp;nbsp; The line in the batch&amp;nbsp;script looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;####&lt;/P&gt;&lt;P&gt;export TODAY=`date "+%Y%m%d.%H%M"`&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;export datecalc=`/opt/maes100/maestro/bin/datecalc today -1 days pic yyyy.mm.dd`&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;###&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question:&amp;nbsp; How to migrate this portion, What kind of utility or command need to use to convert similar date format in linux. Is there anything available to convert date in linux like datecalc utility.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 19:54:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708613#M53735</guid>
      <dc:creator>rveri-admin</dc:creator>
      <dc:date>2012-07-02T19:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: datecalc -utility in unix</title>
      <link>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708623#M53736</link>
      <description>&lt;P&gt;you are going to need to "roll your own".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i suggest the perl module date::calc -- works great&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://search.cpan.org/~stbey/Date-Calc-6.3/lib/Date/Calc.pod"&gt;http://search.cpan.org/~stbey/Date-Calc-6.3/lib/Date/Calc.pod&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 19:59:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708623#M53736</guid>
      <dc:creator>donna hofmeister</dc:creator>
      <dc:date>2012-07-02T19:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: datecalc - utility in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708635#M53737</link>
      <description>&lt;P&gt;Or look at Clay's perl caljd:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h30499.www3.hp.com/t5/tag/caljd/tg-p/category-id/itrc-117"&gt;http://h30499.www3.hp.com/t5/tag/caljd/tg-p/category-id/itrc-117&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 20:08:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708635#M53737</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-07-02T20:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: datecalc - utility in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708663#M53738</link>
      <description>&lt;P&gt;Thanks both,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dennis,&lt;/P&gt;&lt;P&gt;I tried to use the caljd.sh in linux,&amp;nbsp; I changed the shell in the first line of the script from /usr/bin/sh&amp;nbsp;&amp;nbsp; to&amp;nbsp; /bin/bash , but getting error , in getting the YESTARDAY_DATE :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sh-3.2$ YESTERDAY_DATE=$(caljd -s -y $(caljd -p 1))&lt;BR /&gt;./caljd: line 116: typeset: -Z: invalid option&lt;BR /&gt;typeset: usage: typeset [-afFirtx] [-p] name[=value] ...&lt;BR /&gt;./caljd: line 118: typeset: -Z: invalid option&lt;BR /&gt;typeset: usage: typeset [-afFirtx] [-p] name[=value] ...&lt;BR /&gt;./caljd: line 124: typeset: -Z: invalid option&lt;BR /&gt;typeset: usage: typeset [-afFirtx] [-p] name[=value] ...&lt;BR /&gt;sh-3.2$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any suggesion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 21:03:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708663#M53738</guid>
      <dc:creator>rveri-admin</dc:creator>
      <dc:date>2012-07-02T21:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: datecalc - utility in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708671#M53739</link>
      <description>&lt;P&gt;&amp;gt;I tried to use the caljd.sh in Linux,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the perl version as it should be more portable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also ran into the lack of -Z in typeset when I ported a script to bash.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 21:10:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708671#M53739</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-07-02T21:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: datecalc - utility in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708691#M53740</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&amp;nbsp; Since it is linux , there are lot of flexibility for date command , and I found a good one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very simple:&amp;nbsp; $ date -d yesterday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ date -d yesterday&lt;BR /&gt;Sun Jul&amp;nbsp; 1 15:43:29 MDT 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Todays Date:&lt;/P&gt;&lt;P&gt;$ date "+%Y.%m.%d"&lt;BR /&gt;2012.07.02&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Yesterdays Date:&lt;/P&gt;&lt;P&gt;$ date "+%Y.%m.%d" -d yesterday&lt;BR /&gt;2012.07.01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its so cool...&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 21:44:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/datecalc-utility-in-unix/m-p/5708691#M53740</guid>
      <dc:creator>rveri-admin</dc:creator>
      <dc:date>2012-07-02T21:44:14Z</dc:date>
    </item>
  </channel>
</rss>

