Re: how to get only error/warnning messages from a file

2010-01-27 Thread John W. Krahn
V U Maheswara rao k wrote: Thanks Jhon, my search string may be more than 100 words like ("warnings", "errors", "Caution","Debug","notice","info"..etc). so that I want to get it from array and search it in each line I want to search a list in a line of file. perldoc -q "How do I efficiently m

Re: how to get only error/warnning messages from a file

2010-01-27 Thread Shlomi Fish
On Wednesday 27 Jan 2010 18:21:01 Jim Gibson wrote: > At 6:44 PM +0530 1/27/10, V U Maheswara rao k wrote: > >Thanks Jhon, > > > >my search string may be more than 100 words like ("warnings", "errors", > >"Caution","Debug","notice","info"..etc). so that I want to get it from > >array and search it

Re: how to get only error/warnning messages from a file

2010-01-27 Thread Jim Gibson
At 6:44 PM +0530 1/27/10, V U Maheswara rao k wrote: Thanks Jhon, my search string may be more than 100 words like ("warnings", "errors", "Caution","Debug","notice","info"..etc). so that I want to get it from array and search it in each line I want to search a list in a line of file. Alternat

Re: how to get only error/warnning messages from a file

2010-01-27 Thread V U Maheswara rao k
Thanks Jhon, my search string may be more than 100 words like ("warnings", "errors", "Caution","Debug","notice","info"..etc). so that I want to get it from array and search it in each line I want to search a list in a line of file. On Wed, Jan 27, 2010 at 6:28 PM, John W. Krahn wrote: > V U Ma

Re: how to get only error/warnning messages from a file

2010-01-27 Thread John W. Krahn
V U Maheswara rao k wrote: HI , Hello, I have to get only error messages and warnings text form "/var/log/messages". I wrote below code for to get only "warnings, error and caution " messages from a file. but grep command wont work. because I have to pass scalar variable to search. #!/usr/b