[lkml]   [1997]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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

C is even more powerful, since you can use flex (you want flex
idioms too?).


 \ /
  Last update: 2005-03-22 13:39    [W:0.037 / U:0.540 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site