From: John F Riordan (jriorda2@CSC.COM)
Date: Fri Sep 06 2002 - 15:08:02 EDT
Hello all,
I have my trusty O'Reilly sed & awk book and have been searching the
archives for help on writing an awk script that will sort by and group by
the first field. Then subtotal field 2 3 and 4. The sorting and grouping
are fine, but having a real hard time with the subtotal. I understand this
is not the forum for general questions such as this and I do apologies for
that. So with that said, any help would be greatly appreciated. If not I
understand.
Thanks
John
INPUT FILE Looks like this: Allocatd Used Free %
/u02 1000000 500000 500000 50
/u01 200000 100000 5000
50
/u02 1000000
500000 500000 50
/u02 200000 100000 5000 50
/u01 100000 50000 2500 50
/usr 100000 50000 2500 50
I CAN GET output like this:
/u01 1000000 500000 500000 50
100000 500000 2500 50
Wold like subtotal here
/u02 1000000 500000 500000 50
200000 100000 5000 50
200000 100000 5000 50
Would like subtotal here etc..
/usr 100000 50000 2500 50
John Riordan
Unix Systems Administrator
CSC/BIW DD(X)
Brunswick, ME 04011
207.442.1094 jriorda2@csc.com
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:11 EDT