I wanted to initialize a large array in bash, preferably using MATLAB style array initialization. For e.g. I want something similar to following
Declare an array with elements ranging from 0 to 1000 with the gap of 5
array=0:5:1000
I know you can achieve that in a for loop as following
for i in {0..1000..5}
do
done
But same does not work in the following case
array={0..1000..5}
syntax error: operand expected (error token is "{0..1000..5}")