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