title: How do I inline an array of strings in a bash for loop?
body: <p>How do I inline an array of strings in a bash for loop ? This works:</p>
  
  <pre><code>array=(one two)
  for i in ${array[*]};do echo $i; done
  </code></pre>
  
  <p>But I'd like to eliminate the extra local variable. I've tried many variations that seem reasonable, for example:</p>
  
  <pre><code>for i in ${("one" "two")[*]};do echo $i; done
  </code></pre>
  
  <p>or</p>
  
  <pre><code>for i in ${"one" "two"};do echo $i; done
  </code></pre>
  
  <p>In each case, it treats <code>one</code> and <code>two</code> as commands :(</p>