Messages in this thread | | | Date | Wed, 30 Apr 1997 22:20:40 -0400 | From | Raul Miller <> | Subject | Re: procfs problems |
| |
> > Anyway, I don't see why there is such a big deal being made about this, > > when it's not too hard to do...
On Apr 30, Dan Hollis wrote > You've obviously never tried. :-/
I've been successful every time I've gotten into this kind of thing.
Here's the most useful shell idioms:
read first second third rest cut -f2 -d' ' cut -c8-15 awk '{print $3}'
Note that cut has very different parsing semantics from read and awk.
Note that sed can be good for trimming off the first couple of lines (e.g. sed 1,2d), if you don't want the human readable headers.
C is even more powerful, since you can use flex (you want flex idioms too?).
-- Raul
| |