[olug] One-liner adding machine

Phil Brammer olug at wjjeep.com
Mon Feb 6 20:27:24 UTC 2006


On Mon, Feb 06, 2006 at 02:23:23PM -0600, Daniel Linder wrote:
> 
> And if you want to see the running total as Jays first example...
> 
> awk -F"," '{total += $3; print total, $3}; END{print total}'
> test
> 
> So, using the same "test" file as Phil used, the output is like
> this:
> 
> 1 1
> 21 20
> 24 3
> 64 40
> 64
> 
> Dan

Oh yeah, forgot about the running total part of Jay's example...  

Phil



More information about the OLUG mailing list