Relative Content

Tag Archive for bashunixterminalgreptail

how can i tail the last line of multiple log files, only if they have not completed yet?

I have multiple subdirectories, and each has a log file that I want to check, but I only want to check the log files that have not reached the “completed” state. The last line of a completed log file contains the word “completed”. These log files could be large (10k+ lines), so I know grep might not be ideal.
I want to print the last line of each log file that hasn’t completed yet.