
set file test_if3
if [ -L $file ]
then
    echo $file is a link
elif [ -S $file ]
then
    echo $file is a socket
elif [ -b $file ]
then
    echo $file is a block special
elif [ -c $file ]
then
    echo $file is a character special
elif [ -d $file ]
then
    echo $file is a directory
elif [ -f $file ]
then
    echo $file is a regular file
fi

if [ -e $file ]
then
    echo $file exists
fi
if [ -r $file ]
then
    echo $file is readable
fi
if [ -w $file ]
then
    echo $file is writable
fi
if [ -r $file ]
then
    echo $file is executable
fi

set file2 test_if
list ($file|$file2)

if [ $file -nt $file2 ]
then
    echo $file is newer than $file2
else
    echo $file is older than $file2
fi
