I found this solution: http://stackoverflow.com/questions/7178888/grep-q-not-exiting-with-tail-f
but is there any other possible?
UPD: I want to do tail -f | grep -q something && echo 'found!' but it doesn't work because tail -f prevents pipe from being closed, so echo command don't have a chance to be executed.