Is there a program...

LeetViet

Platinum Member
Mar 6, 2003
2,411
0
0
Is there a program that searches a plain txt file for duplicate entries?

Say like if I type 123 on one line and at the bottom type 123 it'll find it and delete it.
 

LeetViet

Platinum Member
Mar 6, 2003
2,411
0
0
Originally posted by: amdfanboy
Sounds like a job for scripting and a map.



I have some txt files that I'd like to import to my MySQL database but Navicat messes up when there are duplicate entries and sometimes not all the entries are added (although it continues on).
 

cjr22

Member
Mar 21, 2003
65
0
0
On linux, I'd use sort and uniq to tell me which lines were duplicated, and then use sed or something to trim out those lines. Post again if this is helpful but you need more explanation.
 

LeetViet

Platinum Member
Mar 6, 2003
2,411
0
0
Trying to do this in Windows.

I have a .txt file that contains some duplicate entries

i.e.

1 Test
2 Test2
3 Test3
1 Test

I'm looking for a program that will find and delete the duplicates without me having to manually search through every one of the unique entries.
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Each one is on a different line? I would do it, but I'm kind of crammed for time. I would just use a map or something to keep track of what lines I have read . I would read each line in, if it was already there , I wouldn't write it to the output file.
 

mattg1981

Senior member
Jun 19, 2003
957
0
76
if you are on linux you could create a simple little script using sed or awk that could easily do it
 

LeetViet

Platinum Member
Mar 6, 2003
2,411
0
0
Yes, they're on separate lines.

Is there anything for Windows? I'd like to learn to do this myself so I can be self reliant in the future.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Yup. If you don't want to install the whole thing, I can send you sort and uniq and the DLL, but for various reasons, you should use their installer .
 

LeetViet

Platinum Member
Mar 6, 2003
2,411
0
0
Originally posted by: CTho9305
Yup. If you don't want to install the whole thing, I can send you sort and uniq and the DLL, but for various reasons, you should use their installer .

I'd actually prefer that, that's what I did for patch.exe and diff.exe
 

LeetViet

Platinum Member
Mar 6, 2003
2,411
0
0
Got it. Thanks!

So just go to command prompt with the files in the same DIR and type what yous aid?
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |