小编Sül*_*han的帖子

在 while 循环中未找到 Bash 脚本命令错误

我有问题,仍然无法处理。:(这是我的代码

declare -i disk_usage_rate=$(df -h /appdata/SCT_CDR | cut -d '%' -f 1 | awk 'NR==2{print $5}')

while ["$disk_usage_rate" -gt 80]
do
...
...
done
Run Code Online (Sandbox Code Playgroud)

我从 df -h 命令获得磁盘使用率。但是在 while 循环中,我收到了 followig 错误。顺便说一句,它是 bash 脚本。

bash: [84: 找不到命令

我尝试了很多东西,但我还没有解决。

bash comparison declare while-loop typeset

2
推荐指数
1
解决办法
9223
查看次数

标签 统计

bash ×1

comparison ×1

declare ×1

typeset ×1

while-loop ×1