#!/bin/bash

filelist=*
echo $filelist
total=0
echo $filelist

for filename in $filelist
do
   echo $filename
   size=`stat -c%s $filename`;
   echo $size
   echo `expr $total +   $size` 
   total=`expr $total +   $size` 
done

echo "Total size of files in bytes is $total"
