if [ -f $1 ]; then

  if [[ ! -z $2 ]]; then
    echo $2 > $1;
  fi;

  echo `cat $1`;

fi;

