remove duplicate entries from first column??
Hi I have a huge (over 10 gb) file with a list of IP's each followed by a corresponding number like this:
Code:
12.32.34.23 10 I'm trying to sort this file numerically and weed out any duplicate IP addresses. How do I do this on bash? I have come up with this but obviously it does'nt work. Code:
$sort -n myfile.txt | cut -f1 | uniq -u Thanks, Adi |
Nevermind, got my answer:
I did a: Code:
sort -n -u -k1 myfile.txt |
Please mark as SOLVED once you have your answer.
|
All times are GMT -5. The time now is 04:13 AM. |