bash update脚本返回true但无论如何都会失败

时间:2016-07-04 17:08:56

标签: bash shell sh

我正在进行" on-boot更新" bash脚本,但在Konsole中打开它返回:

{"id": "xx", "name": "xx", "other": {"@ref": "xx"}}

以下是代码(screenshot):

other

1 个答案:

答案 0 :(得分:0)

我猜问题是

while [$upd=True] #Mind the spaces after [ and before ]

应该是

while [ "$upd" = True ] #Also the mind spaces before and after =

注意

$upd放在双引号中以防止分词。