#export usage='Usage: sh applyPatches4fa_allcases.sh <Parameter Properties File Name>'
if [ $# -lt 1 ]; then
echo "The parameters are incorrectly passed"
echo $usage
echo $usageexample
exit 1
fi
if test -f $1
then
echo $1 'file exist'
else
echo $1 'file does not exist'
exit 1
fi
logfile=applyPatches4fa.log;
if [ -f "$logfile" ]; then
rm -f $logfile;
else
touch -a $logfile;
fi
上面的代码在我的 applyPathes.sh 文件中,下面我在控制台上运行命令 sh applyPatches.sh ok.sql
我得到低于输出
ok.sql file exist
line 20: syntex error near unexpected token fi