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
if you don't have bc installed, try
echo $(( $(... | paste -sd+ -) ))
instead of
... | paste -sd+ - | bc
$( ) <-- return the value of executing the command
$( )
$(( 1+2 )) <-- return the evaluated results
$(( 1+2 ))
echo <-- echo it to the screen
echo