Hi all,
this is my first post, and i want to say hello to everyone in there.
I've a little problem for you all .
I have a log like this:
and i need a script to extract the lines created in the last hour.
Example
I run the script at 15:31 - 07/01/09
i need every line created between the 14:31 - 07/01/09 and now.
But is not certain that there is a line in the log with that hour. The log can be unchanged in the last week or can contain several lines with the same timestamp.
The script need also to run between days and mounth changes example:
run at 00:30 07/01/09 i need every line FROM 23:30 an 06/30/09 .
Welcome to unix.com and Please dont explode.
search with datecalc and you will get a script that can do the date calculation for you.
use the date command to get the date when you are running the script.
Try 'man date'
use awk to extract the datestamp from the logfile. use datecalc to check the difference between current date and logfile date.
~ Cheers
Hi All,
I have 2 dates in mm/dd format.
sdate=10/01 (October 01)
edate=10/10 (October 10)
I need the dates in between these 2 dates like below.
10/01
10/02
10/03
10/04
10/05
10/06
10/07
10/08 (1 Reply)
Hi Am Using Unix Ksh ...
I have a Table called date
select * from date ;
Date
01/02/2013
06/02/2013
I need the output as
Missing Date
01/02/2013
02/02/2013
03/02/2013
04/02/2013
05/02/2013
06/02/2013 (2 Replies)
HI,
i have row like this
HHH100037440313438961000201001012012073110220002 N
in this i have 2 dates in pos 25-32 and 33-40 , so based upon the se two dates , i need to generated records between these two values
so in the above record 20100101 and 20120731
need to genearte rows like this... (4 Replies)
Dear experts
I am new bee to scripting...
Pl. help me getting the lines between two strings.
I am getting the oracle sql output as below. and would like to get the time from system date compare with the date in sql output file and extract the lines.
if system time is 2012-07-01 19:15:00 get... (1 Reply)
Hi All,
I am trying to print the dates that falls between 2 date variables into a file. Here is the example.
$BUS_DATE =20120616
$SUB_DATE=20120613
Output to file abc.txt should be : 20120613,20120614,120120615,20120616
Can you pls help me accomplish this in LINUX.
Thanks... (5 Replies)
Hi guys,
For my wiki site I need to fix 1400 pages that use the wrong date format, most pages (not all) use eg. 1988]] I need to change that to (1988)]]
The date range goes back to 1400 so I guess I need to do the following
ssh into my server,
dump mysql database
vi .sql dump
search... (20 Replies)
Don't know if it is important: Debian Linux / MySQL 5.1
I have a table:
media_id int(8)
group_id int(8)
type_id int(8)
expiration date
start date
cust_id int(8)
num_runs int(8)
preferred_time int(8)
edit_date timestamp ON UPDATE CURRENT_TIMESTAMP
id... (0 Replies)
Hi All,
I have files with names as
us_Gec1_wk_01to01_2008.TXT
ad_EngEnt_wk_01to10_2008.TXT
br_EngMov_wk_01to10_2008.TXT
Over here, I need to extract the dates and the year and store them in variables.
How can I achieve the same in bash.
In case of ad_EngEnt_wk_01to10_2008.TXT ... (3 Replies)
I have a 1 GB file.I want to take the information for last one month from that file.
Say i want to extract data from May 1st.
File contents below.
193.135.218.124 - - "GET /jsp/acafai/supplier/notification.htm HTTP/1.1" 200 38531
193.135.218.124 - - "GET /images/2_aca_fai.gif HTTP/1.1"... (5 Replies)
Hello friends,
I am looking for a script or method that can display all the dates between any 2 given dates.
Input:
Date 1
290109
Date 2
010209
Output:
300109
310109
Please help me. Thanks. :):confused: (2 Replies)