Re: procfs problems

Dan Hollis (goemon@sasami.anime.net)
Wed, 30 Apr 1997 17:20:01 -0700 (PDT)


On Wed, 30 Apr 1997, Michael Ballbach wrote:
> Sorry for this, but how hard is it to parse fields in c or bash anyhow?
> Especially if there is some kind of a deliminator like a colon...

Problem is, a colon is a valid character for fields, particularly ethernet
MAC addresses, and interface aliases.

> I'm not a major expert in c, but it's not that hard to read to the
> colon, read past any white space, and read some more. :) With shell
> scripting, use cut -f 1 -d :.

And end up cutting a MAC field into little pieces.

> Anyway, I don't see why there is such a big deal being made about this,
> when it's not too hard to do...

You've obviously never tried. :-/

> What's harder, writing the low level user interfaces to networking
> routines? Or writing a program that parses a file?

Yes.

-Dan