#!/bin/bash
echo "enter file name"
read fn
if test -e $fn
then
echo "file exists"
else
echo "file does not exists"
fi
if test -w $fn ; then
echo "writable"
fi
if test -r $fn
then
echo "readable"
fi
if test -x $fn
then
echo "executable"
fi
if test -d $fn
then
echo "directory"
fi
Looks like syntax was wrong, or multiline identifier "\" was not added at end of line in if conditions.