tail-and-grep routine for interactive shells