How to set a range of array elements in bash
<p>i have an array of zeros</p>

<pre><code>declare -a MY_ARRAY=( $(for i in {1..100}; do echo 0; done) )
</code></pre>

<p>how to set, for example, 12-25th to "1"? i've tried:</p>

<pre><code>MY_ARRAY[12..25]=1
MY_ARRAY[12:25]=1
MY_ARRAY[12-25]=1  
</code></pre>

<p>all not working..</p>

<p>the range 12-25 will be variables obtain from another file.
I am looking for a simple solution better not involve in looping</p>

<p>please help</p>