LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-08-2010, 06:17 AM   #1
smc2
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
--------------------------------------------------------------------------
 
  


Reply

Tags
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 02:12 PM
MySQL ibdata1 growing and growing and growing and... jnojr Linux - Software 1 07-20-2009 07:11 PM
Growing file out of control gilan Linux - General 4 03-13-2007 12:08 AM
XFree86.0.log file growing during normal use to several Gig. mccarta Linux - Hardware 2 06-09-2004 02:48 AM
dublicate values in file topche Programming 10 07-09-2003 04:44 AM


All times are GMT -5. The time now is 02:08 PM.

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