bug-coreutils
[Top][All Lists]
Advanced

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

Re: exiting tail


From: Neil Adair
Subject: Re: exiting tail
Date: Mon, 14 Aug 2006 12:04:44 -0400
User-agent: Thunderbird 1.5.0.4 (Macintosh/20060516)

   Thanks for the response but I left out the -f
   ie. there is no documentation of how to exit tail -f
   I now know it's ctrl c
   Neil
   Pádraig Brady wrote:

Neil Adair wrote:


Why isn't the command to exit tail in the man page?


tail is not an interactive program and
so will not parse commands you enter.
It is known as a filter and just reads stdin and
writes to stdout.

So if you just type `tail`, it will block
reading from stdin which will be connected
to your terminal. You can indicate an end of file
from the terminal with the Ctrl-d key combination.

Now perhaps we could have logic in tail to do:

if (isatty(stdin) && isatty(sterr)) {
    fprintf(stderr,"Hit Ctrl-d to end\n");
}

Can anyone think of non human interactions
between tail and terminals where the above
wouldn't be appropriate?

cheers,
Pádraig.




reply via email to

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