Problems with syntax in a loop (AWK)

Hi guys,

I'm trying to loop through a number of files that is set by whatever is in a field.

eg.

The idea is to split FILELIST down into fields, it could contain 1 - 999 fields and it's bar delimited.

I thought simple, count the number of fields in the field and then loop through each and output them, but no, awk kicks out an error

awk: 0602-562 Field $() is not correct.

Any help would be appreciated.

Cheers
PJ

Never mind, I think I've found a very simple solution.