【发布时间】:2014-11-13 06:25:06
【问题描述】:
所以我有一个脚本(代码如下),我收到以下错误。
错误:
Syntax error near unexpected token newline (line 5)
围绕这个错误的代码是
Sbalert -t "Updating" -m "Downloading and installing the update. Please don't touch your device until it reboots" -d "" &
alert_id="$!"
apt-get install --only-upgrade <Whited00r 7.1 OTA>
reboot
这是为使用 bash 的 iPod 制作的,因此它可能与桌面上的不同......如果有另一种方法来更新特定的包,那也很好......
【问题讨论】:
-
Stack Overflow 的语法高亮可能已经回答了您的问题:看起来您在
"string2之后缺少一个结束双引号。 -
这就是整个脚本...只是没有shebang,我将对其进行编辑以更多地反映代码...