You are not logged in.

#1 08 Aug 2014 13:59

Rulezz
Member
Registered: 23 Jul 2014
Posts: 5

Compare two text file and delete duplicate rows.

Heya,

I got one text(TEXT 1) file with 5 diffrent IP address and another text(TEXT 2) file with 50 IP address. I want to remove the 5 IP address from TEST 1 in TEST 2 and then save it in to another TEXT file called TEXT3.

TEXT1
X
Y
U
I
Z

TEXT2
A
E
R
Q
R
U
I
Y
X
Z
.
.
.

TEXT3
A
E
R
Q
R
.
.
.

Offline

#2 08 Aug 2014 14:57

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,129

Re: Compare two text file and delete duplicate rows.

Something like this should do the trick...

type "TEXT2" | findstr /v /l /x /g:"TEXT1" > "TEXT3"

Last edited by bluesxman (08 Aug 2014 14:59)


cmd | *sh | ruby | chef

Offline

#3 11 Aug 2014 08:37

Rulezz
Member
Registered: 23 Jul 2014
Posts: 5

Re: Compare two text file and delete duplicate rows.

bluesxman wrote:

Something like this should do the trick...

type "TEXT2" | findstr /v /l /x /g:"TEXT1" > "TEXT3"

Thanks! Worked awesome smile

Offline

Board footer

Powered by