我试图在while循环中获取数组,并且还需要更新数组中的值.
以下是我试过的代码.我收到这个错误[0: command not found
[0: command not found
#!/bin/bash i=0 while [$i -le "{#myarray[@]}" ] do echo "Welcome $i times" i= $(($i+1))) done
我该如何解决?
syntax bash shell
bash ×1
shell ×1
syntax ×1