<?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 Script to calculate duration in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525444#M701355</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have the following date time format:&lt;BR /&gt;&lt;BR /&gt;start_date_time|stop_date_time&lt;BR /&gt;Jan  2 2005  7:45:57:206PM|Jan  2 2005  8:20:24:583PM&lt;BR /&gt;&lt;BR /&gt;Wanted to get a duration = stop_date_time - start_date_time&lt;BR /&gt;&lt;BR /&gt;Need help on scripting.&lt;BR /&gt;&lt;BR /&gt;reagrds,&lt;BR /&gt;Munawar</description>
    <pubDate>Thu, 14 Apr 2005 22:59:11 GMT</pubDate>
    <dc:creator>Ahmad Munawwar</dc:creator>
    <dc:date>2005-04-14T22:59:11Z</dc:date>
    <item>
      <title>Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525444#M701355</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have the following date time format:&lt;BR /&gt;&lt;BR /&gt;start_date_time|stop_date_time&lt;BR /&gt;Jan  2 2005  7:45:57:206PM|Jan  2 2005  8:20:24:583PM&lt;BR /&gt;&lt;BR /&gt;Wanted to get a duration = stop_date_time - start_date_time&lt;BR /&gt;&lt;BR /&gt;Need help on scripting.&lt;BR /&gt;&lt;BR /&gt;reagrds,&lt;BR /&gt;Munawar</description>
      <pubDate>Thu, 14 Apr 2005 22:59:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525444#M701355</guid>
      <dc:creator>Ahmad Munawwar</dc:creator>
      <dc:date>2005-04-14T22:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525445#M701356</link>
      <description>You want to do this in a shell script or do you have something like perl?</description>
      <pubDate>Thu, 14 Apr 2005 23:27:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525445#M701356</guid>
      <dc:creator>Ng Oon Tian</dc:creator>
      <dc:date>2005-04-14T23:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525446#M701357</link>
      <description>Hi Ng,&lt;BR /&gt;&lt;BR /&gt;Any would do. I would prefer in shell script.&lt;BR /&gt;&lt;BR /&gt;But if you have one in perl, would great to share.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Apr 2005 23:31:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525446#M701357</guid>
      <dc:creator>Ahmad Munawwar</dc:creator>
      <dc:date>2005-04-14T23:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525447#M701358</link>
      <description>Hi Ahmad,&lt;BR /&gt;&lt;BR /&gt;I created someting like that with a while loop that prints every timeout period to screen and kills the process after one hour :&lt;BR /&gt;&lt;BR /&gt;MAX_TIMEOUT=3600                # Maximum backup time in seconds per process (3600 is one hour)&lt;BR /&gt;TIMEOUT="60"  # Verify period of one minute&lt;BR /&gt;&lt;BR /&gt;  while (( $(UNIX95= ps -xC $(basename ${PROG}) |grep ${ORACLE_SID} |wc -w) &amp;gt; 0 ))&lt;BR /&gt;  do&lt;BR /&gt;    # wait for the timeout period&lt;BR /&gt;    sleep ${TIMEOUT}&lt;BR /&gt;&lt;BR /&gt;    # update counter with one&lt;BR /&gt;    (( counter +=1 ))&lt;BR /&gt;    print counter=${counter}&lt;BR /&gt;    # calculate total waiting time&lt;BR /&gt;    (( wait_time=${counter}*${TIMEOUT} ))&lt;BR /&gt;&lt;BR /&gt;    # print backup time to screen&lt;BR /&gt;    print backup  ${ORACLE_SID} running ${wait_time} seconds&lt;BR /&gt;&lt;BR /&gt;    if (( ${wait_time} &amp;gt;= ${MAX_TIMEOUT} ))&lt;BR /&gt;    then&lt;BR /&gt;      print "Killing  ${ORACLE_SID} backup process after ${wait_time} seconds"&lt;BR /&gt;      kill $(UNIX95= ps -xC $(basename ${PROG}) -o pid | tail -1 )&lt;BR /&gt;    fi&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;&lt;BR /&gt;Renarios</description>
      <pubDate>Fri, 15 Apr 2005 01:22:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525447#M701358</guid>
      <dc:creator>renarios</dc:creator>
      <dc:date>2005-04-15T01:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525448#M701359</link>
      <description>Actually...I have that list of above data in a text file.&lt;BR /&gt;&lt;BR /&gt;I just want to get a duration for each data and write it on next field.&lt;BR /&gt;&lt;BR /&gt;Existing file:&lt;BR /&gt;&lt;BR /&gt;|Jan 2 2005 7:45:57:206PM|Jan 2 2005 8:20:24:583PM|&lt;BR /&gt;&lt;BR /&gt;Expected Result:&lt;BR /&gt;&lt;BR /&gt;|Jan 2 2005 7:45:57:206PM|Jan 2 2005 8:20:24:583PM|&lt;DURATION&gt;|&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DURATION&gt;</description>
      <pubDate>Fri, 15 Apr 2005 01:37:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525448#M701359</guid>
      <dc:creator>Ahmad Munawwar</dc:creator>
      <dc:date>2005-04-15T01:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525449#M701360</link>
      <description>Here is a quick perl script (it expects perl as /usr/bin/perl). You can run it as&lt;BR /&gt;&lt;BR /&gt;$ ./script.pl &lt;DATE_TIME_FILE&gt;&lt;BR /&gt;Jan 2 2005 7:45:57:206PM|Jan 2 2005 8:20:24:583PM|2067&lt;BR /&gt;&lt;BR /&gt;It prints out duration in seconds (you can redirect output to the new file).&lt;BR /&gt;&lt;BR /&gt;The script disregards 3 digits before PM/AM. I assume this is fraction of millisecond.&lt;/DATE_TIME_FILE&gt;</description>
      <pubDate>Fri, 15 Apr 2005 02:14:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525449#M701360</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-04-15T02:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525450#M701361</link>
      <description>Error checking is left as an exercise to the reader :-)</description>
      <pubDate>Fri, 15 Apr 2005 02:15:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525450#M701361</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-04-15T02:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525451#M701362</link>
      <description>Ahmad,&lt;BR /&gt;for the solution you should read:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xea948cc5e03fd6118fff0090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xea948cc5e03fd6118fff0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;A. Clay Stephenson's script does this and a lot more!&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 15 Apr 2005 02:17:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525451#M701362</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-04-15T02:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525452#M701363</link>
      <description>Ok..Guys&lt;BR /&gt;&lt;BR /&gt;I will try now..will let you know soon :-)</description>
      <pubDate>Fri, 15 Apr 2005 02:31:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525452#M701363</guid>
      <dc:creator>Ahmad Munawwar</dc:creator>
      <dc:date>2005-04-15T02:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525453#M701364</link>
      <description>I got some hick up:&lt;BR /&gt;&lt;BR /&gt;The script confuse on AM and PM cause the duration wrong. For example:&lt;BR /&gt;&lt;BR /&gt;|Jan  5 2005 12:39:48:890AM|Jan  5 2005  1:15:17:173AM|-41071&lt;BR /&gt;&lt;BR /&gt;|Jan  6 2005 11:58:58:303AM|Jan  6 2005 12:16:39:466PM|44261&lt;BR /&gt;&lt;BR /&gt;|Jan  9 2005 12:56:18:443PM|Jan  9 2005  1:30:49:986PM|-41129&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Apr 2005 03:24:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525453#M701364</guid>
      <dc:creator>Ahmad Munawwar</dc:creator>
      <dc:date>2005-04-15T03:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525454#M701365</link>
      <description>Oops, need to specially adjust 12pm and 12am. Attached is the modified script.</description>
      <pubDate>Fri, 15 Apr 2005 08:45:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525454#M701365</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-04-15T08:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525455#M701366</link>
      <description>&lt;BR /&gt;The perl below shouls be close... but you would need to verify the AM/PM handling.&lt;BR /&gt;As a european I never managed to figure that one out. for PM you add 12 right? 10:00 PM is really 22:00.&lt;BR /&gt;And 12:30 pm = 24:30 right?&lt;BR /&gt;Hmmm, how can that be, a day has only 24 hours!? &lt;BR /&gt;Is this 5-Jan 12:30PM really 6-Jan 00:30?&lt;BR /&gt;&lt;BR /&gt;:-) :-)&lt;BR /&gt;&lt;BR /&gt;--------------------------- try this ----&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;use Time::Local;&lt;BR /&gt;&lt;BR /&gt;sub my_seconds {&lt;BR /&gt;# Jan 2 2005 7:45:57:206PM&lt;BR /&gt;my ($time)=@_;&lt;BR /&gt;my $t, $hour, $mon;&lt;BR /&gt;if ($time =~ /(\w+)\s+(\d+)\s+(\d+) (\d+):(\d+):(\d+):(\d+)(AM|PM)/) {&lt;BR /&gt;$hour = $4;&lt;BR /&gt;if ($8 eq "PM") { if ($hour == 12) { $hour=0 } else {$hour += 12}}&lt;BR /&gt;$mon = index("JanFebMarAprMayJunJulAugSepOctNovDec",$1)/3;&lt;BR /&gt;$t = timelocal($6,$5,$hour,$2,$mon,$3-1900) + $7/1000;&lt;BR /&gt;}&lt;BR /&gt;return $t;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;chop;&lt;BR /&gt;($t1,$t2) = split (/\|/);&lt;BR /&gt;printf ("%s -- %s -- %9.3f\n", $t1, $t2, my_seconds($t2) - my_seconds($t1));&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Apr 2005 08:53:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525455#M701366</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-04-15T08:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525456#M701367</link>
      <description>12:30 AM is 30 minutes past midnight&lt;BR /&gt;12:30 PM is 30 minutes past noon&lt;BR /&gt;&lt;BR /&gt;So on a 24-hour clock&lt;BR /&gt;&lt;BR /&gt;12:30 AM is 00:30&lt;BR /&gt;&lt;BR /&gt;12:30 PM is 12:30&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Apr 2005 08:59:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525456#M701367</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-04-15T08:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525457#M701368</link>
      <description>Use what's appropriate for it. There's agood tool for everything:&lt;BR /&gt;&lt;BR /&gt;# echo "Jan 2 2005 7:45:57:206PM|Jan 2 2005 8:20:24:583PM" | perl -MDate::Manip -lne'print DateCalc ((map { ParseDate ($_) } split m/\|/ =&amp;gt; $_),\$err)'&lt;BR /&gt;+0:0:0:0:0:34:27&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 15 Apr 2005 09:27:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525457#M701368</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-15T09:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525458#M701369</link>
      <description>lt09:/home/merijn 116 &amp;gt; cat xx.txt&lt;BR /&gt;Jan 5 2005 12:39:48:890AM|Jan 5 2005 1:15:17:173AM&lt;BR /&gt;Jan 6 2005 11:58:58:303AM|Jan 6 2005 12:16:39:466PM&lt;BR /&gt;Jan 9 2005 12:56:18:443PM|Jan 9 2005 1:30:49:986PM&lt;BR /&gt;lt09:/home/merijn 117 &amp;gt; perl -MDate::Manip -lpe'$_.="|".DateCalc ((map { ParseDate ($_) } split m/\|/ =&amp;gt; $_),\$err)' xx.txt&lt;BR /&gt;Jan 5 2005 12:39:48:890AM|Jan 5 2005 1:15:17:173AM|+0:0:0:0:0:35:29&lt;BR /&gt;Jan 6 2005 11:58:58:303AM|Jan 6 2005 12:16:39:466PM|+0:0:0:0:0:17:41&lt;BR /&gt;Jan 9 2005 12:56:18:443PM|Jan 9 2005 1:30:49:986PM|+0:0:0:0:0:34:31&lt;BR /&gt;lt09:/home/merijn 118 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 15 Apr 2005 09:30:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525458#M701369</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-15T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525459#M701370</link>
      <description>&lt;BR /&gt;Ouch, in my feeble attempt to crack a joke I managed to actually confuse myself on the AM/PM thing! Thanks Stephen, for treating me kindly.&lt;BR /&gt;&lt;BR /&gt;---------------------------&lt;BR /&gt;&lt;BR /&gt;use Time::Local;&lt;BR /&gt;&lt;BR /&gt;sub my_seconds {&lt;BR /&gt;# Jan 2 2005 7:45:57:206PM&lt;BR /&gt;my ($time)=@_;&lt;BR /&gt;my $t, $hour, $mon;&lt;BR /&gt;if ($time =~ /(\w+)\s+(\d+)\s+(\d+) (\d+):(\d+):(\d+):(\d+)(AM|PM)/) {&lt;BR /&gt;$hour = $4;&lt;BR /&gt;$hour = 0 if ($hour == 12 &amp;amp;&amp;amp; $8 eq "AM");&lt;BR /&gt;$hour += 12 if ($hour != 12 &amp;amp;&amp;amp; $8 eq "PM");&lt;BR /&gt;$mon = index("JanFebMarAprMayJunJulAugSepOctNovDec",$1)/3;&lt;BR /&gt;$t = timelocal($6,$5,$hour,$2,$mon,$3-1900) + $7/1000;&lt;BR /&gt;}&lt;BR /&gt;return $t;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;chop;&lt;BR /&gt;($t1,$t2) = split (/\|/);&lt;BR /&gt;printf ("%s -- %s %9.3f\n", $t1, $t2, my_seconds($t2) - my_seconds($t1));&lt;BR /&gt;}</description>
      <pubDate>Fri, 15 Apr 2005 10:00:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525459#M701370</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-04-15T10:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525460#M701371</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for the invaluable input.&lt;BR /&gt;&lt;BR /&gt;Finally I got it work..modify lil bit to get :-)&lt;BR /&gt;&lt;BR /&gt;use Time::Local;&lt;BR /&gt;#use Time::localtime;&lt;BR /&gt;&lt;BR /&gt;(my $prog = $0) =~ s|.*/||;&lt;BR /&gt;&lt;BR /&gt;my %mnames = (&lt;BR /&gt; Jan =&amp;gt; 1, Feb =&amp;gt; 2, Mar =&amp;gt; 3, Apr =&amp;gt; 4, May =&amp;gt; 5, Jun =&amp;gt; 6,&lt;BR /&gt; Jul =&amp;gt; 7, Aug =&amp;gt; 8, Sep =&amp;gt; 9, Oct =&amp;gt; 10, Nov =&amp;gt; 11, Dec =&amp;gt; 12,&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;my ($stime, $etime);&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt; chomp;&lt;BR /&gt; next unless /\d+/;&lt;BR /&gt; s/\r//;&lt;BR /&gt; ($stime, $etime) = (split(/\|/, $_))[3,4];&lt;BR /&gt; printf "$_|%.3lf\n", unixtime($etime) - unixtime($stime);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# Time in: Jan  2 2005 8:19:24:503PM&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;sub unixtime {&lt;BR /&gt; my $t = shift;&lt;BR /&gt; return&lt;BR /&gt; unless $t =~ m/^(...)\s+(\d+)\s+(\d+)\s+(\d+):(\d+):(\d+):(\d\d\d)(..)/;&lt;BR /&gt; my $mon = $mnames{$1};&lt;BR /&gt; my $day = $2;&lt;BR /&gt; my $year = $3;&lt;BR /&gt; my $hour = $4;&lt;BR /&gt; my $min  = $5;&lt;BR /&gt; my $sec  = $6;&lt;BR /&gt; my $mili = $7;&lt;BR /&gt; my $am = $8;&lt;BR /&gt; $hour += 12 if $am eq 'PM';&lt;BR /&gt;&lt;BR /&gt; return timelocal($sec, $min, $hour, $day, $mon-1, $year - 1900) &lt;BR /&gt;  + $mili/1000.0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OK..time for giving the points to you.&lt;BR /&gt;&lt;BR /&gt;/munawar</description>
      <pubDate>Sun, 17 Apr 2005 23:26:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525460#M701371</guid>
      <dc:creator>Ahmad Munawwar</dc:creator>
      <dc:date>2005-04-17T23:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script to calculate duration</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525461#M701372</link>
      <description>Munawar,&lt;BR /&gt;&lt;BR /&gt;If you are using POSIX shell, you can use the SECONDS shell variable.  This is the number of seconds since you logged in.  Just do:&lt;BR /&gt;START=$SECONDS&lt;BR /&gt;&lt;BR /&gt;&lt;DO stuff="" here=""&gt;&lt;BR /&gt;&lt;BR /&gt;FINISH=$SECONDS&lt;BR /&gt;&lt;BR /&gt;ELAPSED=$(expr $FINISH - $START)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Mark&lt;/DO&gt;</description>
      <pubDate>Mon, 18 Apr 2005 12:51:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-calculate-duration/m-p/3525461#M701372</guid>
      <dc:creator>Mark Ellzey</dc:creator>
      <dc:date>2005-04-18T12:51:43Z</dc:date>
    </item>
  </channel>
</rss>

