Skip to content
Advertisement

Obtaining UNIQUE VALUE occurrences count in a set of COLUMNS using AWK

IGNORING columns 1 & 2 (only the rest of the columns); I would like to obtain the occurrence COUNT of UNIQUE EVEN values (ignoring ODD ones) for the following set of data.

I have tried:

JavaScript

I obtain 76 but I don’t expect this value.

JavaScript

Advertisement

Answer

You can try this awk command to count unique values ignoring 1st and 2nd column:

JavaScript

If you are counting uniques excluding 1st and 2nd columns and ignoring odd numbers then use:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement