Sometimes, tailing an output log which is constantly being updated doesn't give the whole lines. Why is that?grep pattern input_file > output.log &tail output.logWhy doesn't it print the last line in full?
Why does tailing an output log sometimes give partial lines?
pipe;tail
Reading and writing a file is not line-atomic, and tail -f is not line-buffered. So, when tail -f reads the file while it was still being written, it may reach the end of the file (and therefore stop printing) before the process writing to the file writes the end of the line. When that happens, it prints an incomplete line because that's all it sees.