On Tue, Dec 04, 2007 at 12:03:55AM EST, Bob Proulx wrote: [..]
> I would tend not to use "only" awk here. My own preference is to use > shell scripts and use awk in pieces. Also, instead of parsing /proc I > would use netstat because it is more portable. I am not going to > finish this off but you can see where I am going with this: > > netstat -ni | awk '/^[[:lower:]]/{print$1,$4}' Sorry for the delay. I briefly looked into the netstat approach but pretty much ran into a wall. The problem is that I need to display the delta between two successive counts .. which means that I need to store the i-1 values of my byte counts somewhere they can be accessed next time around. Can't seem to figure how this could be done .. either in awk or with a mixture of bash and awk. Closest I've come to a solution requires temp files .. real ugly.