-3
我想创建一个脚本,以便在一个自助服务终端时间使用。我得到的错误,意外的文件结束,并不能找出我出错的地方
以下secipt给我的错误:
“行30:语法错误:文件意外结束”
我看了一下没有结束的循环可能导致此错误,但我不能确定我的位置出错。
#!/bin/bash
#time notifications
while true
xmessage "Click OK to begin your session." -buttons OK -center
start=$SECONDS
answer=0
while $answer = 0
while [`echo "($SECONDS - $start) % 300" | bc` != 0]
end
answer=$[xmessage "You started (($SECONDS - $start)/60) minutes ago." -buttons continue:0,done:1 -center]
end
end
尝试使用虽然..做......做 – 2014-09-22 16:31:45
/usr/src目录/计时器脚本:行20:语法错误附近意外的标记'做” – adgelbfish 2014-09-22 16:35:30
也同时$答案= 0将不断地分配0到$答案,你可能想要使用比较运算符== – 2014-09-22 16:37:24