<?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: Need help on date variable in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517971#M38607</link>
    <description>Just combining what was already said ...&lt;BR /&gt;&lt;BR /&gt;You can write a small script and use a temporary variable to hold the digits, but you can also do this in one line:&lt;BR /&gt;&lt;BR /&gt;dt=$(date -d $(head -n2 ETCTRN4010000A.092309.023021001.txt |tail -n1 |cut -d ',' -f5) +"%d-%h-%Y")</description>
    <pubDate>Thu, 22 Oct 2009 07:49:26 GMT</pubDate>
    <dc:creator>H.Becker</dc:creator>
    <dc:date>2009-10-22T07:49:26Z</dc:date>
    <item>
      <title>Need help on date variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517967#M38603</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Need your help.I need to get the date from the second line of a file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[devuser@vfabuser ~]$ head -n2 ETCTRN4010000A.092309.023021001.txt | tail -n1&lt;BR /&gt;&lt;BR /&gt;02,3009483,121000248,1,090922,,,/                                               &lt;BR /&gt;[devuser@vfabuser ~]$&lt;BR /&gt;&lt;BR /&gt;If you  see above, I need 090922 stored to a variable as ‘22-SEP-2009’&lt;BR /&gt;&lt;BR /&gt;Please help.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Gaby</description>
      <pubDate>Wed, 21 Oct 2009 06:03:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517967#M38603</guid>
      <dc:creator>Gaby1110</dc:creator>
      <dc:date>2009-10-21T06:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on date variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517968#M38604</link>
      <description>Hello.&lt;BR /&gt;&lt;BR /&gt;| cut -d',' -f5&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Goran</description>
      <pubDate>Wed, 21 Oct 2009 06:51:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517968#M38604</guid>
      <dc:creator>Goran Koruga</dc:creator>
      <dc:date>2009-10-21T06:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on date variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517969#M38605</link>
      <description>Once you have the initial value (090922) captured in a variable...&lt;BR /&gt;&lt;BR /&gt;# Set var for test below&lt;BR /&gt;$ dt="090922"&lt;BR /&gt;&lt;BR /&gt;You can convert the display format using 'date', e.g.:&lt;BR /&gt;$ date -d"${dt}" +"%d-%h-%Y"&lt;BR /&gt;22-Sep-2009</description>
      <pubDate>Wed, 21 Oct 2009 22:22:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517969#M38605</guid>
      <dc:creator>Jared Middleton</dc:creator>
      <dc:date>2009-10-21T22:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on date variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517970#M38606</link>
      <description>Doh, I missed the part where you need this in a different format.  See above for a solution.&lt;BR /&gt;&lt;BR /&gt;info date&lt;BR /&gt;&lt;BR /&gt;will give you more details how to use this with examples (or info coreutils -&amp;gt; date).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Goran</description>
      <pubDate>Thu, 22 Oct 2009 04:17:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517970#M38606</guid>
      <dc:creator>Goran Koruga</dc:creator>
      <dc:date>2009-10-22T04:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on date variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517971#M38607</link>
      <description>Just combining what was already said ...&lt;BR /&gt;&lt;BR /&gt;You can write a small script and use a temporary variable to hold the digits, but you can also do this in one line:&lt;BR /&gt;&lt;BR /&gt;dt=$(date -d $(head -n2 ETCTRN4010000A.092309.023021001.txt |tail -n1 |cut -d ',' -f5) +"%d-%h-%Y")</description>
      <pubDate>Thu, 22 Oct 2009 07:49:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517971#M38607</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2009-10-22T07:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on date variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517972#M38608</link>
      <description>A link to your same question on HP-UX, where you have to work harder:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1380285" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1380285&lt;/A&gt;</description>
      <pubDate>Sat, 24 Oct 2009 03:55:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-date-variable/m-p/4517972#M38608</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-10-24T03:55:57Z</dc:date>
    </item>
  </channel>
</rss>

