grep | sed do not function inline?



Hi all,

Recently I faced a strange behaviour of the Linux commands. I have a
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 -f mylog | grep 'smtg'
tail -f mylog | sed -n 's/end/notend/p'
tail -200 mylog | grep 'smtg' | sed -n 's/end/notend/p'

So, of course, to achieve this result I simply went for perl. But can
anyone tell me what is the reason why this didn't work?

Thanks,
Tudi.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: grep | sed do not function inline?
    ... log file which contains a lot of information. ... I wanted to extract some ... Add the --line-buffered switch to the grep ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: bind9 crashing constantly in etch with no log output
    ... I'm running etch on an Athlon XP1800+ with the k7 kernel, but I tried the 686 kernel too in case there was something about that, though it seemed unlikely. ... I get nothing whatsoever in the log file when it crashes. ... If I run it in the foreground with -g I can get some output, though it varies. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: dhclient filling up my logfiles
    ... > Pick the dhclient messages up in a different log file. ... your lease time is 10 minutes long. ... To unsubscribe, ...
    (freebsd-questions)
  • Re: make dev problems
    ... > you lock yourself out. ... Could there be more sources that I need to extract? ... don't know how to make buildkernel. ... To unsubscribe, ...
    (freebsd-questions)
  • Re: howto extract all the tar.bz2 files in the same directory?
    ... Is there a way to extract them all at once? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ... Martin Marcher ...
    (Debian-User)