I have a huge file (over 30mb) that I am processing through with perl. I am pulling out a list of filenames and placing it in an array called @reports.
I am fine up till here. What I then want to do is go through the array and find any duplicates. If there is a duplicate, output it to the screen.... (3 Replies)
How to find 1 day old file on Windows for Active Perl?
Is there anyone know the method?
If UNIX or LINUX, we can use the "find ...". How to we do for Windows? (4 Replies)
Hi ,
I want to find out the first business day of the month using korn shell programming....
ie if March 1 is saturday , March 2 is sunday and 3 is monday
My code should identify the First business day..as March 3..
hope u got it..
suggestions ???
Pls look into this asap...... (1 Reply)
Hi All,
I want to find the previous day's date and store that in a variable, which will be usuful for further processing.
Any help please.
Regards,
raju (4 Replies)
How to find the Day of the Week of the given Date using perl?
If I have a date in YYY--MM-DD format, how to find the DOW? Based on that, I need to find the following sunday.
Pls help. (5 Replies)
Hi
When trying to find and delete files which are, say, 1 day, the find command misses a day. Please refer the following example.
xxxd$ find . -type f -ctime +1 -exec ls -ltr {} \;
total 64
-rw-rw-r-- 1 oracle xxxd 81 Apr 30 11:25 ./ful_cfg_tmp_20080429_7.dat
-rw-rw-r-- 1... (4 Replies)
I have an application consisting of a number of perl files. I want to find those perl files that have no documentation yet, so I tried the following from the root level of the directory where the application resides:
perldoc -r *
The output is something like the following:
No documentation found... (2 Replies)
I have a problem of Finding Day of the week from date, but i need to do it within awk On SOLARIS
Input:20101007(YYYYMMDD)
Output:Thursday
kindly provide suggestions.
Thanks in advance (8 Replies)
Hi guys,
I had a scenario...
1. I had to get the previous days date in yyyymmdd format
2. i had to create a file with Date inthe format yyyymmdd.txt format
both are different
thanks guys in advance.. (4 Replies)
Hi,
I am new to perl and have a script to which i want to ensure that no matter how many ever times i execute the script it should execute only once per day. Cronjob is not a safe method as I want to built in capability inside the script. (1 Reply)
Discussion started by: ctrld
1 Replies
LEARN ABOUT OSX
timelocal
TIMEGM(3) Linux Programmer's Manual TIMEGM(3)NAME
timegm, timelocal - inverses for gmtime and localtime
SYNOPSIS
#include <time.h>
time_t timelocal (struct tm *tm);
time_t timegm (struct tm *tm);
DESCRIPTION
The functions timelocal() and timegm() are the inverses to localtime(3) and gmtime(3).
NOTES
These functions are GNU extensions. The timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason
to ever use it.
For a portable version of timegm(), set the TZ environment variable to UTC, call mktime() and restore the value of TZ. Something like
#include <time.h>
#include <stdlib.h>
time_t my_timegm (struct tm *tm) {
time_t ret;
char *tz;
tz = getenv("TZ");
setenv("TZ", "", 1);
tzset();
ret = mktime(tm);
if (tz)
setenv("TZ", tz, 1);
else
unsetenv("TZ");
tzset();
return ret;
}
SEE ALSO gmtime(3), localtime(3), mktime(3), tzset(3)GNU 2001-12-26 TIMEGM(3)