I would like to make an array in bash that uses awk to compare a word to a string held in an array
so far i have:

```
     name=( "name1" "name2" "name3" )
     num=0
     awk -F, '$2 == name[0] { num += $1 }; END { print num }'  ~Me/stuff/home.txt

```

for some reason this doesnt work but if i replace name[0] with "name1" it works fine. home.txt looks like

```
     81920,name1
     84985,name2
     11000,name3
     71111,name1
     etc...

```

Any help would be appreciated thankyou.