On Mon, 11 Feb 2008 22:01:45 GMT, "Todd Vargo"
<tlvargo@[EMAIL PROTECTED]
> wrote:
>Richard Bonner wrote:
>> Todd Vargo wrote:
>> > Tom Lake wrote:
>> > > "midjet" wrote:
>> > >> i have a huges files where have duplicate
>> > >> i canot make one by one this
>> > >>
>> > >> does have a simple prg like qb71 or Batch
>> > >> to do the job
>> > >
>> > > Try this:
>> (Snip)
>>
>> > That assumes all duplicates in text file are adjacent. All
non-adjacent
>> > duplicates will be ignored. The following BASIC code removes all
>duplicate
>> > lines.
>> (Snip)
>>
>> *** If the file's line order is not relevant, one could always use
SORT
>> to make the duplicate lines be adjacent first.
>
>SORT was suggested (and used) in the link I provided to an older
>discussion...
>
><quote>
>Check out solutions in this thread.
>http://tinyurl.com/2kynzb
></quote>
>
>But that was not the point. As my BASIC code demonstrates, duplicate
lines
>can be removed without losing the original order. Beside, as I recall,
SORT
>has a 64k limit in some versions.
>
>REQ: A SORT PROGRAM FOR LARGE FILES
>http://tinyurl.com/yqoa5p
For Who are Curious and like to search and ask question
Voila ,
OK, i ask to all of you own to Delete duplicate line
I want to Explain Why i do that , for what reason
Well i have a Email server and i receive a lot of connection
i notice in the Email server i have the possibility
to block them before they connect
I use the log of the email server to grab all the ip address
connecting to email server
This a a small prg in Qbasic
--------
CLS
OPEN "i", #1, "D:\log.txt"
OPEN "o", #2, "d:\lloogg.txt"
a = 0
1 :
a = a + 1
IF EOF(1) = -1 GOTO fin
LINE INPUT #1, a$
a = INSTR(1, a$, "Accepting SMTP connection from")
IF a > 0 THEN
b$ = MID$(a$, a + 32)
b = INSTR(1, b$, ":")
c$ = LEFT$(b$, b - 1)
PRINT #2, c$
END IF
GOTO 1
fin:
CLOSE
--------
if you notice i use a OPEN files in a Alternativ Way
i am a old fasion Basic progamr
Now the log it clean and Grab only the the IP address
i do this
I use Excel from MSOFFICE to Remove Duplicate Yes Excel can do it
and i save the file, and i run this Qbasic prog
it will build my files for the Email server To prevent
Spammer to connect !
--------
CLS
OPEN "i", #1, "d:\dnewss.txt"
OPEN "o", #2, "d:\IPScreen.dat"
PRINT #2, "[127.0.0.1]"
PRINT #2, "IPScreenDefault=Allow"
PRINT #2, "[All IPs]"
REM IPScreen0=84.103.102.46,Prevent
a = 0
1 :
IF EOF(1) = -1 THEN GOTO fin
LINE INPUT #1, a$
B$ = LTRIM$(RTRIM$(STR$(a)))
PRINT #2, "IPScreen" + B$ + "=" + a$ + ",Prevent"
a = a + 1
GOTO 1
fin:
CLOSE
--------
------------------------------------------
A Usenet feed is Available in UDP
****t 1119
Address :224.0.13.10
TO KNOWN witchs Groups are Seed in UDP
Visit : http://spacesst.com/cgi-bin/dnewsweb.exe


|