I'm looking to write to a file after piping output from tail -f through to grep. Say,write to a file "temp" for all lines with "Playing:" within in error_log "FreeSwitch.log".
tail -f "/var/lof/freeswitch/freeswitch.log" | grep "Playing:" > temp
but not working ! It is a centos 5.5
Maybe you have an issue with buffering? See BashFAQ: What is buffering?
You could e.g. try:
tail -f /var/lof/freeswitch/freeswitch.log | grep --line-buffered "Playing:" > temp