title: awk a variable list
body: <p>I'm new on bash programming and actually I didn't find an answer for my topic among the ones just answered.</p>
  
  <p>I got a variable with a list of timestamp values, such as</p>
  
  <pre><code>myvar="16:00:01 17:30:00 18:13:12"
  </code></pre>
  
  <p>What I've to do is to fill an array list with each single timestamp. Right now what I'm doing (and it works) is:</p>
  
  <pre><code>varlist[0]=$(echo $myvar | awk '{$NF = "" ; print $1}')
  varlist[1]=$(echo $myvar | awk '{$NF = "" ; print $2}')
  varlist[2]=$(echo $myvar | awk '{$NF = "" ; print $3}')
  </code></pre>
  
  <p>The problem is that putting everything in a for loop like the following, it doesn't give me the single item timestamp but the entire string.</p>
  
  <pre><code>for (i=1 ; i&lt;=3; i++)
  do
      varlist[$i]=$(echo $myvar | awk '{$NF = "" ; print $i}')
  done
  </code></pre>
  
  <p>How can I loop the awk?</p>