Check latest time where theres the word 'processed' in logfile

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Check latest time where theres the word 'processed' in logfile
# 1  
Old 10-07-2009
Check latest time where theres the word 'processed' in logfile


Im doing a project to check the latest time with the word 'processed' in a logfile. the time range is within 2 hours before the curent datetime to present.

For example:
Current datetime is 'October 6 2009 8:00AM' --- HKT

So the time range that need to check is from 'October 6 2009 6:00AM' to 'October 6 2009 8:00AM'

# 2  
Old 10-08-2009
What have you tried so far? There are tons of date arithemtic example and date comparisons etc. in the forum already - use the search function please and see if any of the examples help you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Search for word in huge logfile and need to continue to print few lines from that line til find date

Guys i need an idea for one shell scripting am struggling with a logic...So the thing is... i need to search for a word in a huge log file and i need to continue to print few more lines from that line and the consecutive line has to end when it finds the line with date..because i know... (1 Reply)
Discussion started by: Prathi
1 Replies

2. UNIX for Beginners Questions & Answers

UNIX script to check word count of each word in file

I am trying to figure out to find word count of each word from my file sample file hi how are you hi are you ok sample out put hi 1 how 1 are 1 you 1 hi 1 are 1 you 1 ok 1 wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
Discussion started by: mirwasim
4 Replies

3. Shell Programming and Scripting

Find time difference based on logfile

Hi All, Firstly thank you for the forum members I need to find time difference b'w two rows of timestamp using awk/shell. Here is the logfile: cat business_file start:skdjh:22:06:2010:10:30:22 sdfnskjoeirg wregn'wergnoeirnfqoeitgherg end:siifneworigo:22:06:2010:10:45:34... (3 Replies)
Discussion started by: Srinivas Gadi
3 Replies

4. Shell Programming and Scripting

Check the file processed Completion

Hi, I have a wierd requirement where i need to check for a file transfered to my Server and once it is completed i need to start processing my jobs. My server is AIX 6.0 and i want to know is there some way in unix i can keep on checking the file and once it is completed successfully i can... (5 Replies)
Discussion started by: prasson_ibm
5 Replies

5. Shell Programming and Scripting

Check whether file is processed in a control file list

I've a list of files which got processed in Target table A and stored in a control file(list of control files). I've want to trigger another process (later) based on this list of files and load into Target table B and continue running this process until this file list is exhuasted. How do I come... (1 Reply)
Discussion started by: manojg9
1 Replies

6. Shell Programming and Scripting

Calculating time windows from logfile timestamps

Hey all. I am working on some scripts in bash to perform a variety of functions; there are a variety of steps involved, and they must happen in a specific sequence; what I need help with is a way to calculate some differences in a timestamp in a logfile. One of the steps in the scripts I am... (3 Replies)
Discussion started by: danowar
3 Replies

7. Shell Programming and Scripting

Unable to create logfile with local time stamp using perl

Hello All, Morning, I am facing problem with my code while creating a log with name as current time stamp using perl. Here is the code. #!/usr/bin/perl my $time=localtime; my ($day,$month,$date,$tm,$year)=split(/ /,$time); my $stamp=$year."_".$month."_".$date; my... (4 Replies)
Discussion started by: krsnadasa
4 Replies

8. Shell Programming and Scripting

perl (word by word check if a hash key)

Hi, Now i work in a code that 1-get data stored in the database in the form of hash table with a key field which is the " Name" 2-in the same time i open a txt file and loop through it word by word 3- which i have a problem in is that : I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

9. Shell Programming and Scripting

to compare latest logfile with the current running time of the script

how can i compare the latest log file with the current time.. consider i am running a script "" at 09:00 ( function of the script is to update the database ) this script is going to create logfile if the script is sucess in case of failure it is not going to create logfile.. ... (0 Replies)
Discussion started by: mail2sant
0 Replies

10. Shell Programming and Scripting

check logfile size

Hello everyone! Can anyone help me with this? I need a script that looks at a logfile and check itīs size. If itīs over a sertain size the i should get an email. Dont really know how the grep that info "the size" Please help.... (4 Replies)
Discussion started by: dozy
4 Replies
Login or Register to Ask a Question