<?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: Script question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199356#M166289</link>
    <description>ll|awk '{print $6,$7} will give you dates stamp of a file. Not date "+format youwant" will give you date as you want. With these two things you should be bale to compare the file dates.&lt;BR /&gt;&lt;BR /&gt;Also when comparing, you can use find . -newer option also. Man find for details.</description>
    <pubDate>Mon, 23 Feb 2004 09:05:25 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2004-02-23T09:05:25Z</dc:date>
    <item>
      <title>Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199355#M166288</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I want to compare the files date with current date of the system. How to do it in  a script. &lt;BR /&gt;&lt;BR /&gt;Please reply. &lt;BR /&gt;&lt;BR /&gt;Thanks and regards&lt;BR /&gt;Prashant&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Feb 2004 08:55:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199355#M166288</guid>
      <dc:creator>Prashant Zanwar_2</dc:creator>
      <dc:date>2004-02-23T08:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199356#M166289</link>
      <description>ll|awk '{print $6,$7} will give you dates stamp of a file. Not date "+format youwant" will give you date as you want. With these two things you should be bale to compare the file dates.&lt;BR /&gt;&lt;BR /&gt;Also when comparing, you can use find . -newer option also. Man find for details.</description>
      <pubDate>Mon, 23 Feb 2004 09:05:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199356#M166289</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-02-23T09:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199357#M166290</link>
      <description>Which scripting language? sh, csh, awk, sed, perl, ...&lt;BR /&gt;&lt;BR /&gt;Please check out A.Clay's date hammer from &lt;A href="https://www.beepz.com/personal/merijn/#Contrib" target="_blank"&gt;https://www.beepz.com/personal/merijn/#Contrib&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Mon, 23 Feb 2004 09:06:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199357#M166290</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-23T09:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199358#M166291</link>
      <description>Well short oof using "find" with the -mtime switch, you could use perl.  Not exactly sure what you mean by "compare" but this line of perl will give you the modification time of the file.  You can compare this with the output of the perl "time" function in which ever way you want.&lt;BR /&gt; &lt;BR /&gt;perl -e 'print map { (stat $_)[9] } glob "filename"&lt;BR /&gt; &lt;BR /&gt;p.s Thanks Merijn for the "map" lesson :)</description>
      <pubDate>Mon, 23 Feb 2004 09:15:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199358#M166291</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-23T09:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199359#M166292</link>
      <description>wheely, that is missing quotes. And comparing to system date (or date script started), better be done with&lt;BR /&gt;&lt;BR /&gt;# perl 'print map { -M } map { glob $_ } @ARGV' file ...&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Mon, 23 Feb 2004 09:20:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199359#M166292</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-23T09:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199360#M166293</link>
      <description>I want to do it using KSH and awk, I want to see if file is older than these many days to current date, I want to compress or delete the file. &lt;BR /&gt;Actual shell script would be helpful. &lt;BR /&gt;&lt;BR /&gt;Thanks for all responses, I will assign points..&lt;BR /&gt;Thanks&lt;BR /&gt;Regards&lt;BR /&gt;Prashant&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Feb 2004 09:35:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199360#M166293</guid>
      <dc:creator>Prashant Zanwar_2</dc:creator>
      <dc:date>2004-02-23T09:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199361#M166294</link>
      <description>The command your looking for is:&lt;BR /&gt;&lt;BR /&gt;find &lt;FILE-OR-DIR&gt; -type f -mtime +&lt;NUMBER-OF-DAYS&gt; -exec gzip {} \;&lt;BR /&gt;&lt;BR /&gt;This will gzip files older then the number of days specified.&lt;/NUMBER-OF-DAYS&gt;&lt;/FILE-OR-DIR&gt;</description>
      <pubDate>Mon, 23 Feb 2004 09:41:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199361#M166294</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-02-23T09:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199362#M166295</link>
      <description>Merijn,&lt;BR /&gt; &lt;BR /&gt;I see I still need more lessons :)</description>
      <pubDate>Mon, 23 Feb 2004 09:42:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3199362#M166295</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-23T09:42:59Z</dc:date>
    </item>
  </channel>
</rss>

