help-gnu-utils
[Top][All Lists]
Advanced

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

Re: Specifying multiple separators via FS or the -F command line flag


From: cga2000
Subject: Re: Specifying multiple separators via FS or the -F command line flag
Date: Tue, 11 Dec 2007 20:24:32 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]