Adding up columns of numbers...

e.c.leeper ecl at mtgzz.UUCP
Sun Jun 16 11:24:29 AEST 1985


> Yes indeedy... here's a quick little script to get you started with
> multiple columns of numbers.....
> 
> (Followed by 35-line shell/awk script)

Far too complicated!

How about:
	echo 0 `sed -e 's/$/+/' -e 's/-+/-/' <file` pq | dc

Should handle negative numbers (e.g., "4-") also.


					Evelyn C. Leeper
					...ihnp4!mtgzz!ecl



More information about the Comp.unix.wizards mailing list