<?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: Single digit months to single digit? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069765#M94879</link>
    <description>&amp;gt;the 'date "+%1m"' works perfectly, however come next month. which is 10 will the one be chopped off or will it remain 10?&lt;BR /&gt;&lt;BR /&gt;The output of printf says it expands the field to contain the significant digits, it won't be truncated.  Only %w.ps will truncate to the precision.</description>
    <pubDate>Thu, 20 Sep 2007 14:31:39 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-09-20T14:31:39Z</dc:date>
    <item>
      <title>Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069754#M94868</link>
      <description>How can I take the output from "date +%m" which is "09" and change it to just a "9"?  I want all the months that start with a 0 (01, 01...09) to trim off the 0.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Wed, 19 Sep 2007 14:12:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069754#M94868</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2007-09-19T14:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069755#M94869</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# date "+%1d" &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 19 Sep 2007 14:26:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069755#M94869</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-19T14:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069756#M94870</link>
      <description>Try the cmd below:&lt;BR /&gt;&lt;BR /&gt;# date +'%0.m'</description>
      <pubDate>Wed, 19 Sep 2007 14:27:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069756#M94870</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-09-19T14:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069757#M94871</link>
      <description>Hi (again) :&lt;BR /&gt;&lt;BR /&gt;Sorry, you said "month" not "day":&lt;BR /&gt;&lt;BR /&gt;# date "+%2m" #...with leading space&lt;BR /&gt;&lt;BR /&gt;# date "+%1m" #...without leading space&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 19 Sep 2007 14:28:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069757#M94871</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-19T14:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069758#M94872</link>
      <description>&lt;!--!*#--&gt;There are some evil European locales where this may be done automatically.&lt;BR /&gt;for i in $(locale -a); do&lt;BR /&gt;   echo $i ====&lt;BR /&gt;   LANG=$i locale -k d_fmt| grep -v %d&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;For months use:&lt;BR /&gt;   ... grep -v -e %m -e %b</description>
      <pubDate>Thu, 20 Sep 2007 02:56:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069758#M94872</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-20T02:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069759#M94873</link>
      <description>Ok, the 'date "+%1m"' works perfectly, however come next month....which is 10 will the one be chopped off or will it remain 10?  I just want any month with a leading 0, that the 0 is chopped.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the responses!</description>
      <pubDate>Thu, 20 Sep 2007 06:51:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069759#M94873</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2007-09-20T06:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069760#M94874</link>
      <description>Or use awk:&lt;BR /&gt;date "+%m" | awk '{ gsub(/^0?/,""); print $0 }'&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 20 Sep 2007 07:05:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069760#M94874</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2007-09-20T07:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069761#M94875</link>
      <description>Works fine:&lt;BR /&gt;&lt;BR /&gt;# date 10010805&lt;BR /&gt;Mon Oct  1 08:05:00 EDT 2007&lt;BR /&gt;# date "+%1m"&lt;BR /&gt;10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 20 Sep 2007 07:05:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069761#M94875</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-09-20T07:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069762#M94876</link>
      <description>Alternatively, let the shell evaluate the output from 'date' as an integer:&lt;BR /&gt;&lt;BR /&gt;$ echo $(( $(date "+%m") ))&lt;BR /&gt;9&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Sep 2007 07:10:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069762#M94876</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2007-09-20T07:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069763#M94877</link>
      <description>date +%m 1|bc</description>
      <pubDate>Thu, 20 Sep 2007 07:15:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069763#M94877</guid>
      <dc:creator>AwadheshPandey</dc:creator>
      <dc:date>2007-09-20T07:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069764#M94878</link>
      <description>Thanks!</description>
      <pubDate>Thu, 20 Sep 2007 07:19:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069764#M94878</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2007-09-20T07:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Single digit months to single digit?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069765#M94879</link>
      <description>&amp;gt;the 'date "+%1m"' works perfectly, however come next month. which is 10 will the one be chopped off or will it remain 10?&lt;BR /&gt;&lt;BR /&gt;The output of printf says it expands the field to contain the significant digits, it won't be truncated.  Only %w.ps will truncate to the precision.</description>
      <pubDate>Thu, 20 Sep 2007 14:31:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/single-digit-months-to-single-digit/m-p/5069765#M94879</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-20T14:31:39Z</dc:date>
    </item>
  </channel>
</rss>

