A typical for-loop does not work in the ESXi shell.
[root@localhost:~] for i in {1..5}; do echo $i; done
{1..5}
[root@localhost:~] for ((i=1; i<=5; i++)) ; do echo $i; done
-sh: syntax error: bad for loop variableVMware ESXi
VMware ESX
ESXi uses a BusyBox-based lightweight shell (ash), and its functionality is limited.
Use the seq command instead of shell expansion.
[root@localhost:~] for i in $(seq 1 5); do echo $i; done
1
2
3
4
5