<?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 how can  do this date conversion? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919160#M109062</link>
    <description>i wanna make a shell to check core and if there is one core ,it will rename the core automatic, for example:&lt;BR /&gt;-rw-rw-rw-   1 pin        pin              1 Mar  5 08:54  core&lt;BR /&gt;&lt;BR /&gt;the core should be rename core.200303050854&lt;BR /&gt;&lt;BR /&gt;i have no idea how can i do it in some simple way&lt;BR /&gt;</description>
    <pubDate>Wed, 05 Mar 2003 01:02:12 GMT</pubDate>
    <dc:creator>gary_35</dc:creator>
    <dc:date>2003-03-05T01:02:12Z</dc:date>
    <item>
      <title>how can  do this date conversion?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919160#M109062</link>
      <description>i wanna make a shell to check core and if there is one core ,it will rename the core automatic, for example:&lt;BR /&gt;-rw-rw-rw-   1 pin        pin              1 Mar  5 08:54  core&lt;BR /&gt;&lt;BR /&gt;the core should be rename core.200303050854&lt;BR /&gt;&lt;BR /&gt;i have no idea how can i do it in some simple way&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Mar 2003 01:02:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919160#M109062</guid>
      <dc:creator>gary_35</dc:creator>
      <dc:date>2003-03-05T01:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: how can  do this date conversion?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919161#M109063</link>
      <description>Hi Gary,&lt;BR /&gt;&lt;BR /&gt;I tried to write a script on the fly. Create dummy core files in subdirectories any test directory and run this against the directory. Make sure it works as you need before running it on the system.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;if [ $# -ne 1 ]&lt;BR /&gt;then&lt;BR /&gt;echo "Usage:$0 Directory"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;DIR=$1&lt;BR /&gt;chart="&lt;BR /&gt;Jan-01&lt;BR /&gt;Feb-02&lt;BR /&gt;Mar-03&lt;BR /&gt;Apr-04&lt;BR /&gt;May-05&lt;BR /&gt;Jun-06&lt;BR /&gt;Jul-07&lt;BR /&gt;Aug-08&lt;BR /&gt;Sep-09&lt;BR /&gt;Oct-10&lt;BR /&gt;Nov-11&lt;BR /&gt;Dev-12&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;move()&lt;BR /&gt;{&lt;BR /&gt;file=$1&lt;BR /&gt;Month=$(ls -al $file |awk '{print $6}')&lt;BR /&gt;DAY=$(ls -al $file |awk '{print $7}')&lt;BR /&gt;TimeYear=$(ls -al $file |awk '{print $8}')&lt;BR /&gt;&lt;BR /&gt;for i in $chart&lt;BR /&gt;do&lt;BR /&gt;echo $i |grep $Month &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;if [ $? = 0 ]&lt;BR /&gt;then&lt;BR /&gt;MON=$(echo $i |awk '{FS="-";print $2}')&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;echo $TimeYear |grep ":" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;if [ $? = 0 ]&lt;BR /&gt;then&lt;BR /&gt;HR=$(echo $TimeYear|awk '{FS=":";print $1}')&lt;BR /&gt;MIN=$(echo $TimeYear|awk '{FS=":";print $2}')&lt;BR /&gt;YEAR=$(date |awk '{print $6}')&lt;BR /&gt;else&lt;BR /&gt;HR=00&lt;BR /&gt;MIN=00&lt;BR /&gt;YEAR=$TimeYear&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;mv $file $file.${YEAR}${MON}${DAY}${HR}${MIN}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;for FILE in $(find $DIR -name core)&lt;BR /&gt;do&lt;BR /&gt;move $FILE&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Mar 2003 01:43:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919161#M109063</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-03-05T01:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: how can  do this date conversion?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919162#M109064</link>
      <description>&lt;BR /&gt;For this format: filename.yyyymmddhhmm&lt;BR /&gt; &lt;BR /&gt;DATE=$(date +%Y +%b +%d +%H +%M)&lt;BR /&gt;&lt;BR /&gt;filename.$DATE</description>
      <pubDate>Wed, 05 Mar 2003 02:51:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919162#M109064</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2003-03-05T02:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: how can  do this date conversion?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919163#M109065</link>
      <description>I will agree with jsut one liner date substituion.&lt;BR /&gt;Do a man on date and it will tell you more for varios output format...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Mar 2003 03:08:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919163#M109065</guid>
      <dc:creator>monasingh_1</dc:creator>
      <dc:date>2003-03-05T03:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: how can  do this date conversion?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919164#M109066</link>
      <description>Guys - Read his message. He is not trying to create a file. He is renaming a file with the it's (not current)datestamp as the extension. &lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 05 Mar 2003 03:15:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-do-this-date-conversion/m-p/2919164#M109066</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-03-05T03:15:44Z</dc:date>
    </item>
  </channel>
</rss>

