How to take set of numbers?

I have to take a list of numbers from the keyboard and not by passing arguments. How will I read a set of numbers in such a way that I can use any number I wish to operate upon. Is there any specific command to do so. As said before I dont want to pass the numbers as arguments from command line.
Example:take a list of numbers from the keyboard and add them.

Use read
while true; do
read -p "Enter a number (leave blank to finish) : " N
[ -z "$N" ] && break
((Total+=N))
done
echo "Sum of entered numbers : $Total"
exit 0

NOTE: There isn't any check for a valid number

Thanks for the reply. It works! :smiley:

#!/bin/sh
echo -n "enter list of numbers (seperated by space) -"
read nums
echo $nums | awk '{for(i=1;i<=NF;i++){tot+=$i}} END {print tot}'

invocation

sh readnumber.sh
enter list of numbers (seperated by space) -2 4 6 8
o/p
20