The command tail -f
command is great for tracing, and in terminal it's very helpful to be able to, for example, hit enter, and type a comment like
-- after xyz change... --
For record purposes, I would like to be able to pipe the tail output to terminal, plus my annotations, to a second file. Is this possible (other than copying and pasting the output manually)? Thanks!
Best Answer
This does what you need:
Note, it duplicates your comments for the terminal output when you press enter.
It works also with
{...}
and(...)
instead ofsh -c
, but thentail -f
won't stop running when you press ctrl+c.