if [ -f filename ]
then
echo "file exist"
else
echo "Sorry, file does not exist"
fi
if [ -d directory ]
then
echo "directory exist"
else
echo "Sorry, directory does not exist"
fi
if [ -f filename ]
then
echo "file exist"
else
echo "Sorry, file does not exist"
fi
if [ -d directory ]
then
echo "directory exist"
else
echo "Sorry, directory does not exist"
fi