|
From: | konsolebox |
Subject: | Allow tail to display data after stream stops sending input after N seconds |
Date: | Sun, 24 Apr 2022 10:45:55 +0000 |
A command like this doesn't display data: tail -f /var/log/messages -n +1 | grep -e something --line-buffered | tail probably because the last tail waits for the pipe to terminate. But this could work if there exists an option like -S which allows tail to wait for N seconds before considering input as "stopped" and then displaying currently absorbed input. Current workaround would be to use a temporary file and use sleep or maybe some repeated inotify checks before running second tail but it's messy. -- konsolebox
[Prev in Thread] | Current Thread | [Next in Thread] |