From: Ragnar Moller \(MA/EAF\) (ragnar.moller@ericsson.com)
Date: Thu Jan 25 2007 - 09:48:41 EST
Precision on this question from some time ago
It really seems to be the sed that isn't happy with the tail output
piped
My two sed statemets are probably not optimized, beginner, but the
examples should illustrate
tail -50 /var/opt/OV/share/log/trapd.log | grep "Error."| sed
's/^.*STI_//p'| sed 's/_.*$//p'
Works
tail -f /var/opt/OV/share/log/trapd.log | grep "Error."| sed
's/^.*STI_//p'| sed 's/_.*$//p'
No output
tail -f /var/opt/OV/share/log/trapd.log | grep "Error."
Works as well
Br,
R MOLLER
> _____________________________________________
> From: Ragnar Moller (MA/EAF)
> Sent: jeudi 25 janvier 2007 11:24
> To: 'sunmanagers@sunmanagers.org'
> Subject: 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@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:41:31 EDT