cleaning the file

Hi,

I have a file with multiple rows. each row has 8 columns.

Column 8 has entries separated by commas. I want to exclude all the rows in which column 8 has more than 3 commas.

1234#0/1 - ABC_1234 3 ATGCATGCATGC  HHHIIIGIHVF  1 49:T>C,60:T>C,78:C>A,76:G>T,65:T>G

Thanks,

Diya

awk 'split($NF,a,",")<=3' infile

Thanks.. It worked:)

But can you explain what you did?

split(string, array [, fieldsep [, seps ] ])
split() returns the number of elements created.