Shell script that takes a command –line argument and reports on whether it is directory, a file, or something else

				
					echo " enter file"
read str
if test -f $str
then echo "file exists n it is an ordinary file"
elif test -d $str
then echo "directory file"
else
echo "not exists"
fi
if test -c $str
then echo "character device files"
fi
				
			

Leave a Reply