tech-net archive

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

Re: ifconfig v2

In article <>,
David Young  <> wrote:
>The usual way to separate the interfaces is to check
>isatty(STDOUT_FILENO) and to assume that if it's true, then there is a
>person reading the output, and if it's false, then there is a program
>reading the output.  That doesn't get us very far.  Even if a second
>program reads the output, a person may ultimately read the output of
>the second program.  The second program may be a pager like 'more', for
>example, or it may be an awk script that filters the output before the
>user reads it.

I dislike this; I prefer an explicit flag that changes the format of the
output. At least this makes debugging easier.

ifconfig -a | grep foo

printing different stuff than ifconfig -a is madness.


Home | Main Index | Thread Index | Old Index