200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > Syntax error: “then“ unexpected (expecting “done“)

Syntax error: “then“ unexpected (expecting “done“)

时间:2023-01-30 05:10:52

相关推荐

Syntax error: “then“ unexpected (expecting “done“)

今天写一个while脚本,发现报错:Syntax error: “then” unexpected (expecting “done”)

代码段如下:

while :doif[ "$HW" = "$HW1" ];thenbreakelsesleep 0.5fidone

查资料说是linux和windows的环境不一样,最后重新手敲了一遍,发现是if后没有加空格导致

记录一下,自己的粗心大意

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。