Sponsored Content
Top Forums Shell Programming and Scripting How to calculate time difference between start and end time of a process! Post 302450732 by durden_tyler on Friday 3rd of September 2010 03:15:51 PM
Old 09-03-2010
Quote:
Originally Posted by smarty86
can i run that script in windows? if yes can you give me the link to download perl for windows having DATE::Calc command please...
Yes, you can, as long as you have Perl and the Date::Calc module installed in your system.

Date::Calc is a Perl module and not a "command". Try ActiveState Perl; it's a popular Windows port of Perl.

Use PPM (Perl Package Manager) that ships with their Perl port to install Date::Calc from CPAN.

Quote:
...and also while googling i found out that i just need to run something to install Date::calc in unix. is that true? if yes then can u give me that file which i need to run, if you have it with you?
It's not a "file". You can install Perl modules in many different ways in Linux (not sure about Unix). Have a look at perlmodinstall.

HTH,
tyler_durden
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Start time/end time and status of crontab job

Is there anyway to get the start time and end time / status of a crontab job which was just completed? Of course, we know the start time of the crontab job since we are scheduling. But I would like to know process start and time recorded somewhere or can be fetched from a command like 'ps'. ... (3 Replies)
Discussion started by: thambi
3 Replies

2. Shell Programming and Scripting

How to calculate this time difference

Hi, Please help me in calculating the time difference between below mentioned timestamps. a=07/17/2007 02:20:00 AM MST b=07/17/2007 02:07:46 AM MST Thanks (2 Replies)
Discussion started by: Prat007
2 Replies

3. Shell Programming and Scripting

How to calculate the time difference...

Hi All, I've written a script which reads all the systems backup information and saves it in a log file. ssh -l ora${sid} ${primaryhost} "tail -2 /oracle/$ORACLE_SID/sapbackup/back$ORACLE_SID.log" |head -1 | awk '{print echo "PREVIOUS:-- Start Date&Time: " $3,$4,echo "|| End Date&Time:... (1 Reply)
Discussion started by: suri.tyson
1 Replies

4. Shell Programming and Scripting

How to calculate the time difference.

Hi All, I've written a script which reads all the systems backup information and saves it in a log file. ssh -l ora${sid} ${primaryhost} "tail -1 /oracle/$ORACLE_SID/sapbackup/back$ORACLE_SID.log" | awk '{print $3,$4,$5,$6}' >> ${RESULTFILE} The output comes as below: 2008-09-30 06.00.01... (2 Replies)
Discussion started by: suri.tyson
2 Replies

5. Shell Programming and Scripting

How to get data between the start time and end time?

Hi, Can anyone help me how can I get the line that between the start time and end time. file1.txt 15/03/2009 20:45:03 Request: - Data of this line 15/03/2009 20:45:12 Response: - Data of this line 15/03/2009 22:10:40 Request: - Data of this line 15/03/2009 22:10:42 Response: - Data of... (1 Reply)
Discussion started by: tanit
1 Replies

6. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

7. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

8. Shell Programming and Scripting

Calculate time difference

I have time in a file in HH:MM:SS format as it contents(its not the file creation time). i need this to be converted to epoch time or time since 1970. The time is written into that file by a script, which i cannot modify. Im using AIX machine $ cat abc.txt 10:29:34 (2 Replies)
Discussion started by: gpk_newbie
2 Replies

9. Shell Programming and Scripting

Calculate time difference between two lines

i grepped the time stamp in a file as given below now i need to calculate time difference file data: 18:29:10 22:15:50 (5 Replies)
Discussion started by: vivekn
5 Replies
Color::Calc::ConfigData(3pm)				User Contributed Perl Documentation			      Color::Calc::ConfigData(3pm)

NAME
Color::Calc::ConfigData - Configuration for Color::Calc SYNOPSIS
use Color::Calc::ConfigData; $value = Color::Calc::ConfigData->config('foo'); $value = Color::Calc::ConfigData->feature('bar'); @names = Color::Calc::ConfigData->config_names; @names = Color::Calc::ConfigData->feature_names; Color::Calc::ConfigData->set_config(foo => $new_value); Color::Calc::ConfigData->set_feature(bar => $new_value); Color::Calc::ConfigData->write; # Save changes DESCRIPTION
This module holds the configuration data for the "Color::Calc" module. It also provides a programmatic interface for getting or setting that configuration data. Note that in order to actually make changes, you'll have to have write access to the "Color::Calc::ConfigData" module, and you should attempt to understand the repercussions of your actions. METHODS
config($name) Given a string argument, returns the value of the configuration item by that name, or "undef" if no such item exists. feature($name) Given a string argument, returns the value of the feature by that name, or "undef" if no such feature exists. set_config($name, $value) Sets the configuration item with the given name to the given value. The value may be any Perl scalar that will serialize correctly using "Data::Dumper". This includes references, objects (usually), and complex data structures. It probably does not include transient things like filehandles or sockets. set_feature($name, $value) Sets the feature with the given name to the given boolean value. The value will be converted to 0 or 1 automatically. config_names() Returns a list of all the names of config items currently defined in "Color::Calc::ConfigData", or in scalar context the number of items. feature_names() Returns a list of all the names of features currently defined in "Color::Calc::ConfigData", or in scalar context the number of features. auto_feature_names() Returns a list of all the names of features whose availability is dynamically determined, or in scalar context the number of such features. Does not include such features that have later been set to a fixed value. write() Commits any changes from "set_config()" and "set_feature()" to disk. Requires write access to the "Color::Calc::ConfigData" module. AUTHOR
"Color::Calc::ConfigData" was automatically created using "Module::Build". "Module::Build" was written by Ken Williams, but he holds no authorship claim or copyright claim to the contents of "Color::Calc::ConfigData". perl v5.14.2 2012-06-30 Color::Calc::ConfigData(3pm)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy