arrays in bash

hi guys,

i have the following script and when i run it i get blank lines on the screen.. i am trying to display the contents of array var..

#!/usr/bin/bash
var[$i]=`awk 'NR>20&&NR<31' try.sum | awk '{print $4}'`
echo "${var[1]}"

What's in $i? Try changing line 1 so that you're assigning var[1], not var[$i].