Re: find string from command outut in log file
From: Bit Twister (BitTwister_at_localhost.localdomain)
Date: 08/08/03
- Next message: Rainer Temme: "Re: Shared library usage by the process"
- Previous message: DINH Viêt Hoà: "Re: Order of memory segments"
- In reply to: Cliff Chittenden: "Re: find string from command outut in log file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 08 Aug 2003 12:55:54 GMT
On 7 Aug 2003 22:13:44 -0700, Cliff Chittenden wrote:
> Bit Twister <BitTwister@localhost.localdomain> wrote in message news:<slrnbj48co.1um.BitTwister@wb.home>...
>> On 7 Aug 2003 01:13:21 -0700, Cliff Chittenden wrote:
>> > I am no Unix expert and what I wish to achieve is a little difficult
>> > to describe, so please bear with me! Whilst tailing a log file I run
>> > a command string (I suspect this command string is an internally
>> > written script of some kind) which writes a list to the log. The list
>> > is quite long and wide and I need to find a particular string in the
>> > output. My eyes aren't what they used to be, so I'd like to filter
>> > out the string I am interested in and just write the lines containing
>> > said string to the log. Any ideas?
>>
>> try man grep
>>
>> Example: grep string_2_find from_some_filename_here > my.log
>
> Thanks Bit Twister, but that's not quite what I was after. It
> requires that I first run my command to send the list to the log file
> and then run grep on the log. I'd like something that writes just the
> lines I require to the log. Because I am already running a tail on
> the log, I will see the lines I want as they are written to the log.
> Any help on this would be greatly apreciated.
tail -f from_some_filename_here | grep string_2_find > my.log
Even though bash is not unix, some light reading found at
http://www.tldp.org/LDP/abs/html/index.html
- Next message: Rainer Temme: "Re: Shared library usage by the process"
- Previous message: DINH Viêt Hoà: "Re: Order of memory segments"
- In reply to: Cliff Chittenden: "Re: find string from command outut in log file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|