#!/bin/bash
#     lsbytesum - sum the number of bytes in a directory listing
lsbytesum ()
{
TotalBytes=0
for Bytes in $(ls -l | grep "^-" | cut -c30-41)
do
    let TotalBytes=$TotalBytes+$Bytes
done
TotalMeg=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
echo -n "$TotalMeg"
}
PS1="[\u@\h:\w (\$(lsbytesum) Mb)]\$ "