-1

how would you do that

  1. Loop through files based on a pattern
  2. Extract a value from within that files (value is always there and a number)
  3. Summarize all these values
  4. echo the sum out

Many thanks in advance and greetings

1 Answers1

0

To less info to be more exact. So I leave a template only:

let sum=0
for f in __PATTERN__
do
    value=__extract__from "$f"  # any functionality ...
    let sum+=value
done
printf "summary: %u\n" $sum
Wiimm
  • 2,971
  • 1
  • 15
  • 25
  • The question is not on-topic for Stack Overflow as defined in the [help] - instead of answering, you should flag them for attention and they will be closed or migrated appropriately. – Toby Speight Mar 04 '19 at 21:30