Given a list of files in files.txt, I can get a list of their sizes like this:
cat files.txt | xargs ls -l | cut -c 23-30
which pr
sizes=( $(cat files.txt | xargs ls -l | cut -c 23-30) )
total=$(( $(IFS="+"; echo "${sizes[*]}") ))
Or you could just sum them as you read the sizes
declare -i total=0
while read x; total+=x; done < <( cat files.txt | xargs ls -l | cut -c 23-30 )
If you don't care about bite sizes and blocks is OK, then just
declare -i total=0
while read s junk; total+=s; done < <( cat files.txt | xargs ls -s )