<?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: set date variable to 1 hr behind in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019396#M96916</link>
    <description>Thats great - thanks Peter.</description>
    <pubDate>Mon, 18 Dec 2006 11:42:46 GMT</pubDate>
    <dc:creator>lawrenzo_1</dc:creator>
    <dc:date>2006-12-18T11:42:46Z</dc:date>
    <item>
      <title>set date variable to 1 hr behind</title>
      <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019393#M96913</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;This problem is a bit tricky for me to work out:&lt;BR /&gt;&lt;BR /&gt;NHOST=`hostname`&lt;BR /&gt;WKPATH=/sysadmin/scripts/performance&lt;BR /&gt;SAPATH=/sysadmin/logs/performance&lt;BR /&gt;FDATE=`date +%Y%m%d_%H%`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am searching for a performance file that is created then renewed hourly by a different script - the script I run must search for the date an hour previously.  I could use ls |tail |grep etc however I have many files in the performance directory and do not wish to put unnessasary load on the system:&lt;BR /&gt;&lt;BR /&gt;is there a way I can get the correct file by minus 1hr??  ie:&lt;BR /&gt;&lt;BR /&gt;The file is created every hour at the same time run by cron:&lt;BR /&gt;&lt;BR /&gt;lobster99_20061218_1601.tmp is moved to &lt;BR /&gt;lobster99_20061218_1601.tmp at 1701 &lt;BR /&gt;&lt;BR /&gt;I need to take into account for the 24hr clock so at 00:01 i need to process the file 23:01.&lt;BR /&gt;&lt;BR /&gt;how can this be done?&lt;BR /&gt;&lt;BR /&gt;many thanks &lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Dec 2006 11:31:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019393#M96913</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-12-18T11:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: set date variable to 1 hr behind</title>
      <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019394#M96914</link>
      <description>Chris,&lt;BR /&gt;change the TZ variable within your script&lt;BR /&gt;For example:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;date&lt;BR /&gt;otz=`echo $TZ`&lt;BR /&gt;TZ="GMT1BST"&lt;BR /&gt;date&lt;BR /&gt;TZ="$otz"&lt;BR /&gt;date&lt;BR /&gt;&lt;BR /&gt;$ ./b.sh&lt;BR /&gt;Mon Dec 18 16:41:22 GMT 2006&lt;BR /&gt;Mon Dec 18 15:41:22 GMT 2006&lt;BR /&gt;Mon Dec 18 16:41:22 GMT 2006&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Dec 2006 11:41:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019394#M96914</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-12-18T11:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: set date variable to 1 hr behind</title>
      <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019395#M96915</link>
      <description>Take a look at the post from spex regarding using "find" and "touch" to locate files &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1037903" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1037903&lt;/A&gt;</description>
      <pubDate>Mon, 18 Dec 2006 11:42:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019395#M96915</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2006-12-18T11:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: set date variable to 1 hr behind</title>
      <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019396#M96916</link>
      <description>Thats great - thanks Peter.</description>
      <pubDate>Mon, 18 Dec 2006 11:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019396#M96916</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-12-18T11:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: set date variable to 1 hr behind</title>
      <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019397#M96917</link>
      <description>Thanks guys,&lt;BR /&gt;&lt;BR /&gt;The find is an option I did consider.&lt;BR /&gt;&lt;BR /&gt;Peter,&lt;BR /&gt;&lt;BR /&gt;if I change the timezone within the script, doesnt that mean the system time changes even if for a moment?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 18 Dec 2006 11:49:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019397#M96917</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-12-18T11:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: set date variable to 1 hr behind</title>
      <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019398#M96918</link>
      <description>Chris,&lt;BR /&gt;no, as long as you do not export, the variable data stays within the script.</description>
      <pubDate>Mon, 18 Dec 2006 11:51:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019398#M96918</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-12-18T11:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: set date variable to 1 hr behind</title>
      <link>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019399#M96919</link>
      <description>cheers fellas</description>
      <pubDate>Mon, 18 Dec 2006 12:02:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/set-date-variable-to-1-hr-behind/m-p/5019399#M96919</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-12-18T12:02:06Z</dc:date>
    </item>
  </channel>
</rss>

