Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,368

    Unanswered: script help please

    How can I sum up "Total Pages" and "Used Pages" for:

    DAT Object Summary
    INX Object Summary
    LOB Object Summary
    LBA Object Summary
    XDA Object Summary


    in the attached file?


    Can I use cut, awk ... to get this info? Please provide some examples.


    Thanks
    Attached Files Attached Files

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Code:
    awk '/Object Summary: Total/ {tot[$1]+=$6;used[$1]+=$10} 
    END {for (n in tot) {printf "%3s %9s %9s\n",n,tot[n],used[n]}}' insp.out.txt
    Last edited by pdreyer; 03-15-11 at 05:46.

  3. #3
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,368
    Thx a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •