report or omit repeated lines
References
man uniq
-c, --countPrefix lines by the number of occurrences-i, --ignore-caseIgnore differences in case when comparing
-d, --repeatedOnly print duplicate lines, one for each group-s, --skip-chars=NAvoid comparing the first N characters-u, --uniqueOnly print unique lines-w, --check-chars=NCompare no more than N characters in lines
-D, --all-repeated[=METHOD]Print all duplicate lines groups can be delimited with an empty line METHOD={none(default),prepend,separate}-f, --skip-fields=Navoid comparing the first N fields--group[=METHOD]Show all items, separating groups with an empty line METHOD={separate(default),prepend,append,both}
Sample
$ cat txt1
test 30
test 30
test 30
Hello 95
Hello 95
Hello 95
Hello 95
Linux 85
Linux 85$ uniq txt1
test 30
Hello 95
Linux 85$ uniq -c txt1
3 test 30
4 Hello 95
2 Linux 85Sample
$ cat txt2
Test 30
test 30
test 30
Hello 95
Hello 95
hello 95
hello 95Default
$ uniq txt2
Test 30
test 30
Hello 95
hello 95Ignore Case
$ uniq -i txt2
Test 30
Hello 95Sample
$ cat txt3
test 30
Hello 95
Hello 95
Linux 85
Linux 85
Linux 85$ uniq -d txt3
Hello 95
Linux 85$ uniq -u txt3
test 30Sample
$ cat txt4
Apple
Apple
Application
Application
Station
Station
Section
Section$ uniq -w3 txt4
Apple
Station
Section$ uniq -s4 txt4
Apple
Application
StationSample
$ cat txt5
Apple
Application
Application
Apple$ uniq txt5
Apple
Application
Apple$ sort txt5 | uniq
Apple
Application