coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request about "Tail -f": Gentle exit (not using CTRL+C)


From: L A Walsh
Subject: Re: Feature request about "Tail -f": Gentle exit (not using CTRL+C)
Date: Thu, 25 Oct 2018 18:50:59 -0700
User-agent: Thunderbird

On 10/21/2018 10:14 AM, Ingo Krabbe wrote:
Hi Brian,

you actually have many more options to leave a tail -f.
---
   What other key can you press to exit tail that is not likely
to also be a control-signal.  I.e. I think what may be wanted here is
pressing 'q' or something similar?

   This would require a small addition of code to monitor stdin
and, perhaps itself send a SIGHUP to parent and exit.  But it guarantees
that that an uncaught SIG won't end up being sent to the parent.

   For example:

 for f in /tmp/*;do
 tail -f "$f"
 done

That code prints the tail of the 1st file in the dir.  But if I press
control-c, it also kills the for-loop.
Perhaps that is undesired?
....wow...what do you know...
that was EXACTLY what was wanted.

Some simple keypress to allow an exit.
What is it with all the complexity and non-intuitive methods to kill it?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]