Teaching mode, engage!
top -bn1 |grep -A9999 "^ *PID " |awk '{foo+=$9} END {print foo}'
top: Run 1 instance of top and send it to STDOUT instead of a fancy tty-aware screen
grep: show me at least 9,999 lines after anything that matches this regexp, and the match itself
awk: use foo as a variable to accumulate the values in field 9 (cpu usage), and print it out once EOF is reached
output: 160.1
...