#/bin/bash

function usage {
  echo Usage: `basename $0` file
  exit 1
}

if [ $# -ne 1 ]; then
  usage
fi

if [ -f $1 ]; then
  # ls and awk command
  size=`ls -l $1 | awk '{ print $5; }'`
  echo "$1 = $size bytes"
  # wc command
  size=`wc -c $1 | cut -d' ' -f1`
  echo "$1 = $size bytes"
else
  echo "$1 file not found."
fi


