Given a list of files in files.txt, I can get a list of their sizes like this:
files.txt
cat files.txt | xargs ls -l | cut -c 23-30
which pr
In my opinion, the simplest solution to this is "expr" unix command:
s=0; for i in `cat files.txt | xargs ls -l | cut -c 23-30` do s=`expr $s + $i` done echo $s