![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove duplicate text | dejavu88 | Shell Programming and Scripting | 7 | 06-08-2008 01:37 PM |
| duplicate line in a text file | nixguy | Shell Programming and Scripting | 5 | 04-28-2008 11:19 PM |
| Duplicate records from oracle to text file. | shilendrajadon | UNIX for Advanced & Expert Users | 1 | 01-10-2008 08:21 AM |
| Eleminating output to console | pflink | UNIX for Dummies Questions & Answers | 3 | 02-26-2007 11:37 PM |
| grep multiple text files in folder into 1 text file? | coppertone | UNIX for Dummies Questions & Answers | 7 | 08-23-2002 11:50 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Eleminating Duplicate IPs from a text file
Hey Guys
I need to eleminate duplicate IP's from a text file using bash.Any suggestions.Appreciate your help guys. --CoolKid |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try sort -u
|
|
#3
|
|||
|
|||
|
Tried it..It is not working
|
|
#4
|
|||
|
|||
|
Quote:
uniq This filter removes duplicate lines from a sorted file. It is often seen in a pipe coupled with sort. cat list−1 list−2 list−3 | sort | uniq > final.list # Concatenates the list files, # sorts them, # removes duplicate lines, # and finally writes the result to an output file. Try this logic, hope you'll get the desired one. Thanks Varun. |
|
#5
|
|||
|
|||
|
Thanks for the help folks.
|
|||
| Google The UNIX and Linux Forums |