【发布时间】:2015-01-06 15:12:23
【问题描述】:
我在尝试围绕 done 语句执行下面的脚本时遇到错误。代码的重点是让 while 语句在记录的文件名中列出的文件的持续时间内执行,以便获取分支文件夹中每个文件位置的修订号。
filea=/home/filenames.log
fileb=/home/actions.log
filec=/home/revisions.log
filed=/home/final.log
count=1
while read Path do
Status=`sed -n "$count"p $fileb`
Revision=`svn info ${WORKSPACE}/$Path | grep "Revision" | awk '{print $2}'`
if `echo $Path | grep "UpgradeScript"` then
Results="Reverted - ROkere"
Details="Reverted per process"
else if `echo $Path | grep "tsu_includes/shell_scripts"` then
Results="Reverted - ROkere"
Details="Reverted per process"
else
Results="Verified - ROkere"
Details=""
fi
echo "$Path,$Status,$Revision,$Results,$Details" > $filed
count=`expr $count + 1`
done < $filea
【问题讨论】:
标签: linux shell svn error-handling