Number of fields handled by awk

Hi Gurus,

Have a file seperated by "~" and no of fields is 104. When i try to run awk, it erros out.

awk: record `B~A31~T24_STF~~~2009...' has too many fields

Any idea how can i extract a specific filed with this many fields in a row.

Kindly help

The limit of awk is 100 fields, the alternative is to use gawk or mawk.

Regards

Thanks. Looks like gawk is not avaliable on th machine. Anything with sed?

One way is not to use the ~ as fieldseparator and to place the fields in an array with the split function.
Should be something like this, play around with it:

awk '{
  split($0,array,"~")
  # now you can process the elements array[1]...array[104]
}' file