Just as the title says, Google gives me nothing and I can't test it on this server.
The command as is follows:
tail -f <file> | fgrep --line-buffered "string" | sed -u 's/stuff//g' >> output.log
Do I need to use kill -SIGTERM <PID>
or kill -SIGKILL <PID>
to stop a tail -f
?
So you can use both; but SIGTERM should be preferred (it is more graceful).
Yes, it will. On Linux tail acts on SIGTERM.
You don't even have to use
SIGTERM
.tail
listens forSIGINT
andSIGQUIT
too. I'm not sure if there's any difference between signals (it's all specific totail
) but any of these would be better thanSIGKILL
.It's quite easy to test too: