The command tries to sum up the sizes:
find . -iname "*.dmg" -exec du -sh '{}' \; 3&> /dev/null |
awk '{print $1}' | summming_up_program???
Can you find a simpler solution?
Ubuntu Solution. Thanks for the Awk-end to Ayman.
find . -iname "*.dmg" -printf '%b\n' |
awk 'BEGIN { s = 0 } {s += $1 } END { print "%dMB", s / 2^20 }'