<?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 command output is inconsistent. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260488#M59255</link>
    <description>&lt;!--!*#--&gt;Do an:&lt;BR /&gt;&lt;BR /&gt;echo "$KEEP_STRING"&lt;BR /&gt;&lt;BR /&gt;and I think you will see what you are looking for.  Without the quotes, all spaces are compressed to a single space.&lt;BR /&gt;&lt;BR /&gt;$ KEEP=$(date '+%a %b %_d' --date="20 days ago")&lt;BR /&gt;$ echo $KEEP&lt;BR /&gt;Thu Oct 7&lt;BR /&gt;$ echo "$KEEP"&lt;BR /&gt;Thu Oct  7&lt;BR /&gt;$&lt;BR /&gt;</description>
    <pubDate>Wed, 27 Oct 2010 12:44:50 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2010-10-27T12:44:50Z</dc:date>
    <item>
      <title>date command output is inconsistent.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260487#M59254</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;Output is correct was running date from command line but incorrect when setting an environment variable.&lt;BR /&gt;&lt;BR /&gt;$ date '+%a %b %_d' --date="20 days ago"&lt;BR /&gt;Thu Oct  7&lt;BR /&gt;$ KEEP_STRING=`date '+%a %b %_d' --date="&lt;BR /&gt;20 days ago"`&lt;BR /&gt;$ echo $KEEP_STRING&lt;BR /&gt;Thu Oct 7&lt;BR /&gt;&lt;BR /&gt;Can anyone tell me why?&lt;BR /&gt;and how to correct it?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;RayB</description>
      <pubDate>Wed, 27 Oct 2010 12:24:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260487#M59254</guid>
      <dc:creator>Raynald Boucher</dc:creator>
      <dc:date>2010-10-27T12:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: date command output is inconsistent.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260488#M59255</link>
      <description>&lt;!--!*#--&gt;Do an:&lt;BR /&gt;&lt;BR /&gt;echo "$KEEP_STRING"&lt;BR /&gt;&lt;BR /&gt;and I think you will see what you are looking for.  Without the quotes, all spaces are compressed to a single space.&lt;BR /&gt;&lt;BR /&gt;$ KEEP=$(date '+%a %b %_d' --date="20 days ago")&lt;BR /&gt;$ echo $KEEP&lt;BR /&gt;Thu Oct 7&lt;BR /&gt;$ echo "$KEEP"&lt;BR /&gt;Thu Oct  7&lt;BR /&gt;$&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Oct 2010 12:44:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260488#M59255</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2010-10-27T12:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: date command output is inconsistent.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260489#M59256</link>
      <description>Well heck.  I tried using the 'retain format' and it didn't help much.&lt;BR /&gt;&lt;BR /&gt;Consider the '_' characters as spaces below in my test output.&lt;BR /&gt;&lt;BR /&gt;$ KEEP=$(date '+%a %b %_d' --date="20 days ago")&lt;BR /&gt;$ echo $KEEP&lt;BR /&gt;Thu_Oct_7&lt;BR /&gt;$ echo "$KEEP"&lt;BR /&gt;Thu_Oct__7&lt;BR /&gt;$&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Oct 2010 12:46:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260489#M59256</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2010-10-27T12:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: date command output is inconsistent.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260490#M59257</link>
      <description>I'll be darned... &lt;BR /&gt;Learn something every day don't we.&lt;BR /&gt;&lt;BR /&gt;I swore at that for an hour yesterday.&lt;BR /&gt;Thanks much.&lt;BR /&gt;&lt;BR /&gt;Ray</description>
      <pubDate>Wed, 27 Oct 2010 12:50:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260490#M59257</guid>
      <dc:creator>Raynald Boucher</dc:creator>
      <dc:date>2010-10-27T12:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: date command output is inconsistent.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260491#M59258</link>
      <description>Worst part is that after checking, I don't need to use the space padding functionality; I'll be looking for a zero padded day.&lt;BR /&gt;&lt;BR /&gt;Take care</description>
      <pubDate>Wed, 27 Oct 2010 12:56:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/date-command-output-is-inconsistent/m-p/5260491#M59258</guid>
      <dc:creator>Raynald Boucher</dc:creator>
      <dc:date>2010-10-27T12:56:23Z</dc:date>
    </item>
  </channel>
</rss>

