5

awk summing specific lines and fields

view full story
linux-howto

http://www.unix.com – Hi I would like to know if it is possible to sum some specific fields. I have this Code: x;x;x;x;x;x;x;x;467,390,611 Bytes;0.435291 GB;0.062247 GB;0.373045 GB;11,225;157 a;a;a;a;a;a;a;a;13,805,156,846 Bytes;12.857054 GB;1.838559 GB;11.018495 GB;151,063;18,933 b;b;b;b;b;b;b;b;232,797,478,723 Bytes;216.809547 GB;31.003765 GB;185.805782 GB;176,861;21,445;Parent: Line #545 I need to sum fields 10,11,12,13,14 except any line cotaining wording "Parent Line ...# so currently I am doing something like grep -v -i "Parent" >new file, then awk to print specific fields to n (HowTos)