用空文件进行判断

path=`pwd`
if [ -f ${path}/.runned ]; then
{
echo "This script can only execute once! You have runned it!"
exit
}
else
touch ${path}/.runned
fi
05-11 17:05