Logs from logfile


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Logs from logfile
# 1  
Old 06-12-2013
Logs from logfile

Hi Team,

Have to write a shell script to pick only 1 hr logs from the generated logfile and send it to other logfile.

Thanks & Regards,
Indu
# 2  
Old 06-12-2013
Can you elaborate your need ? Do you need a script that runs as a daemon and sends one hour logs to another file ? Or do you need to process an existing log file for logs between a given start and end timestamps ?
# 3  
Old 06-12-2013
Post a snippet of your log file and we may be able to help you.
Do you need a specific hour or the last hour from the log file?
# 4  
Old 06-12-2013
Already logfile exist in the server. That logfile will be getting update every minutes. My script has to run every a hour once and need to search for the word ENTLOGER. If we see the word ENTLOGER, that whole line has to move to another logfile. Am unable to attach the exist logfile.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. Shell Programming and Scripting

Logfile monitoring with logfile replacement

Bonjour, I've wrote a script to monitor a logfile in realtime. It is working almost perfeclty except for two things. The script use the following technique : tail -fn0 $logfile | \ while read line ; do ... some stuff done First one, I'd like a way to end the monitoring script if a... (3 Replies)
Discussion started by: Warluck
3 Replies

3. Shell Programming and Scripting

Logfile Reading

I am reading through a log file that has multiple entries: xx-xxxx-xxx-130111090001 <XML> ... ... </XML> ... ... ... xx-xxxx-xxx-130111100001 <XML> ... ... </XML> There are 2 parts: 1) Take the XML statement and parse out. I have that with a sed script sed -n '/<XML>/,/XML>/p'... (6 Replies)
Discussion started by: SivaAfi
6 Replies

4. Shell Programming and Scripting

[Solved] Fetching logs of last few days from logfile

Hi All, I have a requirement to fetch logs of last 'N' days. I am trying the following command which is working fine if it finds the date of that day in logfile. START=`TZ="GMT+$((24*N))" date +"%Y %b %d"` this is being used to fetch 'N'th day's date and awk '/'"$START"'/{p=1}... (24 Replies)
Discussion started by: KDMishra
24 Replies

5. Shell Programming and Scripting

Parsing Logfile

Hi, I need to continuously monitor a logfile to get the log information between a process start and end. the logfile look like this abcdddddddddd cjjckkkkkkkkkkkk abc : Process started aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbb abc... (6 Replies)
Discussion started by: Byorg
6 Replies

6. Shell Programming and Scripting

logfile parsing

I thought I was pretty handy with awk until I got this one. :) I'm trying to parse a log file where the events could have different delimiters (2 scripts is ok), the errors are spread over multiple lines, and I"m trying to figure out how to not read the same lines that have already been read. ... (1 Reply)
Discussion started by: linkslice
1 Replies

7. UNIX for Dummies Questions & Answers

Logfile manipulation

Hi First of all I m a complete newbie to Linux ... just started working on it exactly a week ago. I know a bit of programming in C but not very good in it.:D I was given task in my workplace and need some help nAJLR02F030879 9805 Thu Nov 19 13:27 <customerservice@YYY.com> ... (2 Replies)
Discussion started by: abilash.amara
2 Replies

8. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

Hi, I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows: """"""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies

9. Shell Programming and Scripting

logfile

hi iam new of the ksh script.iwant in formation of how to call in logfile in ksh scripts. if the meaning in ksh. please help me thanks naveen.g (1 Reply)
Discussion started by: naveeng.81
1 Replies

10. Shell Programming and Scripting

sort a logfile

Hi experts, I need help to sort a big logfile. logfile: ------- 67712 dkjd jd jj jjjj ------ kjkj jhjh kkk yggg lll hhh gffgf jj -------- i kkk kllkkl ------- Now I want every think between the "------" in one line. Normaly with paste no problem but you can see that the... (7 Replies)
Discussion started by: joerg
7 Replies
Login or Register to Ask a Question