report or omit repeated lines
References
man uniq
-c, --count
Prefix lines by the number of occurrences-i, --ignore-case
Ignore differences in case when comparing
-d, --repeated
Only print duplicate lines, one for each group-s, --skip-chars=N
Avoid comparing the first N characters-u, --unique
Only print unique lines-w, --check-chars=N
Compare 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=N
avoid 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 85
Sample
$ cat txt2
Test 30
test 30
test 30
Hello 95
Hello 95
hello 95
hello 95
Default
$ uniq txt2
Test 30
test 30
Hello 95
hello 95
Ignore Case
$ uniq -i txt2
Test 30
Hello 95
Sample
$ 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 30
Sample
$ cat txt4
Apple
Apple
Application
Application
Station
Station
Section
Section
$ uniq -w3 txt4
Apple
Station
Section
$ uniq -s4 txt4
Apple
Application
Station
Sample
$ cat txt5
Apple
Application
Application
Apple
$ uniq txt5
Apple
Application
Apple
$ sort txt5 | uniq
Apple
Application