I'm new on bash programming and actually I didn't find an answer for my topic among the ones just answered.

I got a variable with a list of timestamp values, such as

```
myvar="16:00:01 17:30:00 18:13:12"

```

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:

```
varlist[0]=$(echo $myvar | awk '{$NF = "" ; print $1}')
varlist[1]=$(echo $myvar | awk '{$NF = "" ; print $2}')
varlist[2]=$(echo $myvar | awk '{$NF = "" ; print $3}')

```

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.

```
for (i=1 ; i<=3; i++)
do
    varlist[$i]=$(echo $myvar | awk '{$NF = "" ; print $i}')
done

```

How can I loop the awk?