How to show only lines that appear more than x times. (shell script)

1

I am parsing a log file and I wanted to filter only lines that appear more than 10 times within the file. I just can not find a way to do this filter.

    
asked by anonymous 22.11.2017 / 14:41

1 answer

2

You will use the following command:

sort SeuArquivo | uniq -c

If you still want to sort by the number of occurrences use:

sort SeuArquivo | uniq -c | sort -nr
    
22.11.2017 / 17:04