Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Great! It seems to work. Can you explain to me what the code does in parts? Would be very helpful for understanding. Commented Mar 19, 2015 at 9:41
  • but this does not keep your order. It create too arrays pop and x. In pop we have keys from column1 and value=colum2" "column3" "column4, in x we have keys values from pop and values counting repetitions. In final loop we check for each name in array pop value in array x. Commented Mar 19, 2015 at 9:41
  • you can learn more with man awk Commented Mar 19, 2015 at 9:45
  • 1
    Keeping the order of lines is not necessary, as long as the lines stay intact, so the numbers in column 2,3, and 4, will not be scrambled. Commented Mar 19, 2015 at 9:45
  • @taliezin Please Edit your answer and add your explanation in your comment in body of answer. thanks Commented Mar 19, 2015 at 11:56