You are on page 1of 2

if test $# -ne 1 then echo "usage is: testfile filename" fi file=$1 if test -f $file then echo "$file exists"

fi if [ -d $file ] then "echo $file is a directory" fi if test -s $file then echo "$file is not of zero length" fi if test -r $file -a -w $file then echo "$file is readable and writeable" fi

You might also like