<?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: Manipulating dates in a POSIX shell (/usr/bin/sh) in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019022#M96898</link>
    <description>Hi PAt:&lt;BR /&gt;&lt;BR /&gt;Well, if you don't want Perl, I'd use Clay Stephenson's 'caljd' date manipulation utility!&lt;BR /&gt;&lt;BR /&gt;You can download it from Merijn's website:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mirrors.develooper.com/hpux/" target="_blank"&gt;http://mirrors.develooper.com/hpux/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 15 Dec 2006 08:55:59 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-12-15T08:55:59Z</dc:date>
    <item>
      <title>Manipulating dates in a POSIX shell (/usr/bin/sh)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019020#M96896</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;I have a shell script which needs to get today's date (i.e. 20061215) and add 1 day to this date, so I'd end up having 20061216 in a variable... &lt;BR /&gt;&lt;BR /&gt;In Linux's gnu date command, I have `date -d "+1 day" +"%Y%m%d"` which works perfectly. Installing GNU Date on HPUX isn't an option for me... and I've already got my hole script in shell... so Perl isn't a friendly approach... &lt;BR /&gt;&lt;BR /&gt;Has anyone done this?&lt;BR /&gt;&lt;BR /&gt;Thanks, Pat</description>
      <pubDate>Fri, 15 Dec 2006 08:50:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019020#M96896</guid>
      <dc:creator>PatRoy</dc:creator>
      <dc:date>2006-12-15T08:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating dates in a POSIX shell (/usr/bin/sh)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019021#M96897</link>
      <description>So far, the closest I got was to issue :&lt;BR /&gt;&lt;BR /&gt;date +%s&lt;BR /&gt;&lt;BR /&gt;which gives me the epoch time.. so I'd end up with something like "1166123240". I could just add up "86400", which totals a day's worth, but then, how do I convert that to a date string?&lt;BR /&gt;&lt;BR /&gt;thx again! Pat&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Dec 2006 08:54:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019021#M96897</guid>
      <dc:creator>PatRoy</dc:creator>
      <dc:date>2006-12-15T08:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating dates in a POSIX shell (/usr/bin/sh)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019022#M96898</link>
      <description>Hi PAt:&lt;BR /&gt;&lt;BR /&gt;Well, if you don't want Perl, I'd use Clay Stephenson's 'caljd' date manipulation utility!&lt;BR /&gt;&lt;BR /&gt;You can download it from Merijn's website:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mirrors.develooper.com/hpux/" target="_blank"&gt;http://mirrors.develooper.com/hpux/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Dec 2006 08:55:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019022#M96898</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-15T08:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating dates in a POSIX shell (/usr/bin/sh)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019023#M96899</link>
      <description>Hi Pat:&lt;BR /&gt;&lt;BR /&gt;I have to add that Perl *is* such a straightforward approach for your task, though:&lt;BR /&gt;&lt;BR /&gt;# perl -MPOSIX=strftime -le 'print strftime("%Y%m%d",localtime(time+(86400)))' &lt;BR /&gt;20061216&lt;BR /&gt;&lt;BR /&gt;Plus, as you can see, the syntax mimics the GNU 'date' since both use the 'strftime' C library notation.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 15 Dec 2006 09:30:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019023#M96899</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-15T09:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating dates in a POSIX shell (/usr/bin/sh)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019024#M96900</link>
      <description>Yep.. just found an exact same solution... I had:&lt;BR /&gt;&lt;BR /&gt;perl -MPOSIX -le 'print for strftime( "%Y%m%d", localtime(time + 86400) )'&lt;BR /&gt;&lt;BR /&gt;which does the same.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 15 Dec 2006 09:44:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/manipulating-dates-in-a-posix-shell-usr-bin-sh/m-p/5019024#M96900</guid>
      <dc:creator>PatRoy</dc:creator>
      <dc:date>2006-12-15T09:44:15Z</dc:date>
    </item>
  </channel>
</rss>

