以下脚本有什么问题:
if [ $dayofweek -eq 1 ] then
if [[ ! -f "full$today.tar.gz" ]] then
rm -rf snapshot
tar ${tarOptions} "full$today.tar.gz" $source
fi
else
if [ ! -f "inc$today.tar.gz" ] then
tar ${tarOptions} "inc$today.tar.gz" $source
fi
fi
运行时提示:
未预期的符号 `else' 附近有语法错误