Trung Minh
New member
How do I get unique records in Unix?
Answer
Let us now see the different ways to find the duplicate record.
Answer
Let us now see the different ways to find the duplicate record.
- Using sort and uniq: $ sort file | uniq -d Linux. …
- awk way of fetching duplicate lines: $ awk ‘{a[$0]++}END{for (i in a)if (a>1)print i;}’ file Linux. …
[*]Using perl way: …
[*]Another perl way: …
[*]A shell script to fetch / find duplicate records: