Help with data collection please?

Hello,

I have about 200 different files that I need to get data from. Can someone help with a script that will:

  1. Find the files
  2. Parse the file for a specific number
  3. collect a number to a file (probably)
  4. add up the numbers
  5. spit out the total.

Think it's possible?

BTW - It's a AIX 5.2 OS.

In order to provide any insight, really need to see some examples of input data and the desired output.

Commands like ls, grep, sort, uniq, awk all come to mind to assist, but not enough info to begin any scripting.

Thanks. I think I was over complicating it. What I did was:

  1. grep all the files for a particular line
  2. sent the output to a text file
  3. imported the text file to excel
  4. calculated the numbers

If you provided some examples, myself or someone else might have been able to show you (and everyone else - since that is the purpose of this Board) how you could solve.

grep "something" myfile > selected_file
awk 'commands here' selected_file

the 'commands here' would have
read through records
set counters for array elements
add totals for array elements
print out final result

That is what I was referring to in my previous post. It is always better to include current file samples and desired output.