[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: grep | sed do not function inline?



On 2007-04-22, bilbo <bilbo@l-arrache.com> wrote:
> log file which contains a lot of information. I wanted to extract some
> informations out of it. But when I tried to
>
> tail -f mylog | grep 'smtg' | sed -n 's/end/notend/p'
>
> no output could be found. Which was quite surprising since the
> following tests did their job without any problem:
>
> tail -200 mylog | grep 'smtg' | sed -n 's/end/notend/p'
>

There is only one difference between these two lines - the first
extracts the last 10 lines of mylog, the second extracts the last
200. The data you want is apparently not in the last 10 lines of
mylog. 

Tyler



Reply to: