if your awk can figure out the current Epoch then you'd be able to subtract the "now" Epoch from the "entry_time" Epoch and dole out the desired chunks to an output file.
Although it is not a well known fact, all awk releases are able to retrieve the current epoch time by standard :
These 2 Users Gave Thanks to jlliagre For This Post:
I want to calculate the date of next satureday of current date using shell script.
Suppose, today is 27-feb-08
I want to get the date of next satureday, which means 01-mar-08, in the formate '' YYMMDD ".
I do this in ksh..
Please tell me any type of command which help me out.
Thanks in... (3 Replies)
Hello,
I'm using ls -laR to print out a list of file and folders. I want to print only the permission, file size and file name. Also, excluding the '.' and '..'.
result from ls -laR:
total 6
drwxr-xr-x 8 user staff 512 Nov 28 16:17 .
drwxr-x--- 16 user staff 1024... (3 Replies)
Hi,
I have two time series data (below) merged into a file.
t1 and t2 are in unit of second
I want to calculate the average of V1 every second and count how many times "1" in V2 is occur within a second
Input File:
t1 V1 t2 V2
10.000000... (5 Replies)
Hi everyone, just some simple question...
i've been using a awk script to calculate my data...
i have 3 files:
file a1.txt:
2
3
4
5
3
4
file a2.txt:
4
5
6
7
8 (1 Reply)
Hi Guys,
Please somebody give me a hand to show the Month & Year in assigning to a variable and with format "MMMYY" (i.e. Jul11). See below preferred output.
I tried using this but it is giving me the current month...
date = "`date +%b%y`"
Aug11
DESIRED OUTPUT:
Jul11
... (3 Replies)
Hi,
I have a large data frame as shown below, where data is separated into years.
10 May 2011 Created: 10 May 11 15:05 GMT Scale: SIO-2005 and others
GC-MD, Cape Grim, Tasmania, Lat.: 40.68S, Lon.: 144.69E, Alt: 94m above sea level
You can use the following format in Fortran to read data... (4 Replies)
Hello, i need calculate the day before in this format aammdd, for example if i have 110701 i need a script to return the value 110630.
I only know what with this comand "date %y%m%d" return the date system.
Sorry for my english, it is very bad, i know...
Thank you very much
Grettings! (1 Reply)
How to get Julian date (Three digit) of a given date (Not current date)? I do not have root privilege - so can not use date -d. Assume that we have three variables year, month and date.
Thx (5 Replies)
Hi,
My question is how to calculate the quarter end date according to the current date in shell script? (2 Replies)
Discussion started by: Divya_1234
2 Replies
LEARN ABOUT CENTOS
time
TIME(2) Linux Programmer's Manual TIME(2)NAME
time - get time in seconds
SYNOPSIS
#include <time.h>
time_t time(time_t *t);
DESCRIPTION
time() returns the time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
If t is non-NULL, the return value is also stored in the memory pointed to by t.
RETURN VALUE
On success, the value of time in seconds since the Epoch is returned. On error, ((time_t) -1) is returned, and errno is set appropriately.
ERRORS
EFAULT t points outside your accessible address space.
CONFORMING TO
SVr4, 4.3BSD, C89, C99, POSIX.1-2001. POSIX does not specify any error conditions.
NOTES
POSIX.1 defines seconds since the Epoch using a formula that approximates the number of seconds between a specified time and the Epoch.
This formula takes account of the facts that all years that are evenly divisible by 4 are leap years, but years that are evenly divisible
by 100 are not leap years unless they are also evenly divisible by 400, in which case they are leap years. This value is not the same as
the actual number of seconds between the time and the Epoch, because of leap seconds and because system clocks are not required to be syn-
chronized to a standard reference. The intention is that the interpretation of seconds since the Epoch values be consistent; see
POSIX.1-2008 Rationale A.4.15 for further rationale.
SEE ALSO date(1), gettimeofday(2), ctime(3), ftime(3), time(7)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2011-09-09 TIME(2)