- By Todd A. Jacobs: https://stackoverflow.com/a/12937971/3711707
This will give you a list of duplicate lines which you can then investigate further.
tr 'A-Z' 'a-z' < filename | sort | uniq -d
- Example Data File: numbers.txt
one
One
oNe
two
three
> 'A-Z' 'a-z' < numbers.txt | sort | uniq -d
> one
- You could then grep for related line numbers like so:
grep --ignore-case --line-number one numbers.txt