it complains too many arguments when array[] has few members, it's proper to check whether or not array[0] is zero. Reported-by: Xiao Ni <xni@xxxxxxxxxx> Signed-off-by: Zhilong Liu <zlliu@xxxxxxxx> --- test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test b/test index 87e2df2..25268a0 100755 --- a/test +++ b/test @@ -75,7 +75,7 @@ save_log() { echo elif [ "$DEVTYPE" == 'loop' -o "$DEVTYPE" == 'disk' ] then - if [ ! -z ${array[@]} -a ${#array[@]} -ge 1 ] + if [ ! -z "$array" -a ${#array[@]} -ge 1 ] then md_disks=($($mdadm -D -Y ${array[@]} | grep "/dev/" | cut -d'=' -f2)) cat /proc/mdstat | grep -q "bitmap" -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html