Suppose there is a column of numeric values like following:
1 2 3 3 3 4 4 4 5 6
I want the output:
That is, only the repeated lines. Is there any command line tools to find this out in Linux? (NB: The values are numerically sorted).
You can use
This will print out the duplicates only. The input file needs to be sorted such that all duplicates are consecutive (which they appear to be), so run it through sort first if it is not.