The following table illustrates a brief snapshot of the data that I wish to manipulate. I am looking for an awk script that will group similar elements into one group. For eg. if you look at the table below: Numbers (1,2,3,4,6) should all belong to one group. So row1 row2 row4 row8 will be group “1” Number 9 is unique