#!/bin/bash
# param 1: filename
#
# Parameter check
if [ $# -lt 1 ]
then echo "Missing parameters"
     exit
fi

if [ -e $1 ]
then 
    if [ -f $1 ] 
    then
        if [ -s $1 ]
        then  echo "File $1 is not empty"
        else  echo "File $1 is empty"
        fi
    fi
    if [ -d $1 ] 
    then
        ls -l $1
    fi	
else echo "File $1 does not exists"
fi
