Tail -f piped with sed don't work



I wanted to the output of a log file and clean up a bit in order to
apply another script to the output.

I have a statement with tail -50 which works, but tail -f doesn't.

It also works if I drop the sed filtering at the end.

Have an idea

tail -50 /var/opt/OV/share/log/trapd.log | grep "Error."| sed
's/^.*STI_//p'| sed 's/_.*$//g'
Works

tail -50 /var/opt/OV/share/log/trapd.log | grep "Error."| sed
's/^.*STI_//p'| sed 's/_.*$//g'
No output

Reagrds,

Ragnar Moller
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages

  • Re: opening the file at a specific line number.
    ... the log file gets bigger and bigger. ... the last line from the last time the script ran. ... How do I do a "tail -f" in perl? ...
    (comp.lang.perl.misc)
  • Re: tail command : differences between solaris and linux
    ... ...and the script ends up zero-length. ... ...and if I restore the file, then change the tail command that is ... historic usage on Solaris in their script. ... But a quick check on a Gentoo box here does not support +number. ...
    (Fedora)
  • Re:BW Have to tell you all
    ... now I put Saran wrap over my keyboard and if I spit ... Let the cats clean it for you. ... I sit a cutting board across the sink and sit the crock pot on that. ... Against the light all I could see was a Bottlebrush Tail, ...
    (rec.pets.cats.community)
  • Re: ontape -l roll-forward of many logs
    ... Then write a simple awk script that reads the file /tmp/ontape.out via ... The only gotcha is under Linux you need to use --pid on the tail -f to ... ensure the tail closes when the ontape is complete. ... ontape -l roll-forward of many logs ...
    (comp.databases.informix)
  • Re: Cropping log files
    ... > I'm tyring to figure out how to best crop a log file. ... source for 'tail' and see how it finds the last N lines. ...
    (comp.lang.python)