echo "Enter file name"
read fn
if [ -f $fn ]
then
if [ -s $fn ]
then
echo "File exists and not empty"
else
echo "File exists and empty"
fi
else
echo "File not exists"
fi
echo "Enter file name"
read fn
if [ -f $fn ]
then
if [ -s $fn ]
then
echo "File exists and not empty"
else
echo "File exists and empty"
fi
else
echo "File not exists"
fi
Leave a Reply