[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exiting tail
From: |
Pádraig Brady |
Subject: |
Re: exiting tail |
Date: |
Mon, 14 Aug 2006 16:55:01 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.8 (X11/20060502) |
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.
- exiting tail, Neil Adair, 2006/08/14
- Re: exiting tail,
Pádraig Brady <=