Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-08-2010, 07:17 AM   #1
LQ Newbie
Registered: Apr 2010
Posts: 29

Rep: Reputation: 0
Question Extrac values as highlting a growing file

I have a growing log file. Part of it is like below. I'm using tail and perl -e to watch to hight and track events on this log file.
this is the command now I am using.
PHP Code:
tail -f $fName perl -pe 's/\d*smscid\s*inserted.*\d*/\e[1;32m$&\e[0m/ig;s/(.*(\-\-\-\-)+\>.*)/\e[1;33m$&\e[0m/ig' 
do you know how can I change the Perl script it to extract all of the value (I show the values in red color in the log file below) as color it change their color?

----------------------------Log file-----------------------------
msg_recieve6-->2010-09-08 14:39:48.475sid queue size---->2
scid getting prepareStatement
scid addBatch
scid addBatch
scid executeBatch
scid commit

2scid inserted ...2
msg_recieve24-->2010-09-08 14:39:49.675msg_recieve-->2010-09-08 14:39:49.675Link--->true
msg_recieve6-->2010-09-08 14:39:49.995Link--->true
sid queue size---->1


linux, perl, tail

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
find continuously growing files in the file system dnaqvi Linux - General 7 04-26-2010 03:12 PM
MySQL ibdata1 growing and growing and growing and... jnojr Linux - Software 1 07-20-2009 08:11 PM
Growing file out of control gilan Linux - General 4 03-13-2007 01:08 AM
XFree86.0.log file growing during normal use to several Gig. mccarta Linux - Hardware 2 06-09-2004 03:48 AM
dublicate values in file topche Programming 10 07-09-2003 05:44 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration