test语句实例:
#! /bin/sh
if [ -f /bin/bash ]
then
echo "file /bin/bash exits"
fi
if [ -d /bin/bash ]
then
echo "file /bin/bash is a directory"
else
echo "file /bin/bash is not a directory"
fi