脚本似乎可以正常工作,因为我可以成功地将文件传递到脚本中,并使用"-f“标志解析它们,但我注意到我收到了以下错误(在下面的代码行中: if [[ -n ${variables$argument_label} ]]): 第29行:变量:错误的数组下标 # declaring a couple of associative arraysdeclare -Avariables[$argument_label]}=${arguments[$index]
我是Shell的新手,我一直在尝试在Shell中使用数组,但效果并不好。我正在尝试编写一个脚本,以便在一段时间内OpenVZ容器达到一定的带宽阈值时将其挂起。#!|| ($t1 >= $COUNT1) )) fi sleep $SECS以及错误script.sh: line 54: bytes: bad array subscript
script.sh: line