tech-net archive

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

Re: ifconfig v2



On Thu, Jun 13, 2013 at 02:54:00AM +0000, Christos Zoulas wrote:
> In article <20130612221802.GT3453%pobox.com@localhost>,
> David Young  <dyoung%pobox.com@localhost> 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.

I dislike it, too.  I also dislike that if I set flags that dress up the
ifconfig output with, say, changes in type emphasis or color, it will
not survive a pipeline.  I would like to have a "late binding" of the
style to the content.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index