Create an array with awk

List,

I want to have an array created of a particular item in the following textfile:

router> show user
Se4/0:29 site1 Sync PPP - Bundle: Di372
Se5/0:29 site2 Sync PPP - Bundle: Di340
router>

The array should have 2 entries, site1 and site2

I tried with the following:
ISDNSITES=`grep Bundle isdn.htm | awk '{print $2}'`

Although I get the correct output, it only has one array element, "site1 site2". How can I create multiple elements here?

Thanks a lot for the help!

What shell you are using?

Try...

$ eval $(awk '/Bundle/{printf "ISDNSITE[%d]=\042%s\042\n", ++c, $2}' isdn.htm)

$ echo ${ISDNSITE[1]}
site1

$ echo ${ISDNSITE[2]}
site2