Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic General > Re: How to Remo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 67 Topic 650 of 685
Post > Topic >>

Re: How to Remove duplicates line in the txt files

by midjet <moman@[EMAIL PROTECTED] > Feb 11, 2008 at 08:35 PM

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
 




 67 Posts in Topic:
How to Remove duplicates line in the txt files
midjet <moman@[EMAIL P  2008-02-10 17:46:35 
Re: How to Remove duplicates line in the txt files
Sjouke Burry <burrynul  2008-02-11 00:53:13 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-10 18:56:30 
Re: How to Remove duplicates line in the txt files
"Todd Vargo" &l  2008-02-11 02:43:47 
Re: How to Remove duplicates line in the txt files
Guy Macon <http://www.  2008-02-11 09:29:48 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-11 12:36:18 
Re: How to Remove duplicates line in the txt files
"Todd Vargo" &l  2008-02-11 22:01:45 
Re: How to Remove duplicates line in the txt files
midjet <moman@[EMAIL P  2008-02-11 20:35:42 
Re: How to Remove duplicates line in the txt files
foxidrive <gotcha@[EMA  2008-02-12 13:07:20 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-10 18:14:56 
Re: How to Remove duplicates line in the txt files
midjet <moman@[EMAIL P  2008-02-10 20:53:21 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-11 12:32:31 
Re: How to Remove duplicates line in the txt files
Luuk <Luuk@[EMAIL PROT  2008-02-11 17:30:42 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-12 13:33:40 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-11 19:44:13 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-12 13:38:52 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-12 10:08:34 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-12 09:47:35 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-12 11:04:10 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-12 18:16:28 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-12 13:40:10 
Re: How to Remove duplicates line in the txt files
"Auric__" <n  2008-02-12 23:14:54 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-12 19:34:37 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-12 23:57:10 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-13 00:02:50 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-12 18:13:20 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-12 13:43:22 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-18 14:21:46 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-12 19:07:24 
Re: How to Remove duplicates line in the txt files
ArarghMail802NOSPAM@[EMAI  2008-02-12 17:17:10 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-12 18:53:50 
Re: How to Remove duplicates line in the txt files
ArarghMail802NOSPAM@[EMAI  2008-02-12 21:02:12 
Re: How to Remove duplicates line in the txt files
ArarghMail802NOSPAM@[EMAI  2008-02-13 05:11:46 
Re: How to Remove duplicates line in the txt files
ArarghMail802NOSPAM@[EMAI  2008-02-13 15:31:28 
Re: How to Remove duplicates line in the txt files
ArarghMail802NOSPAM@[EMAI  2008-02-13 18:02:15 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-12 19:24:01 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-12 23:37:02 
Re: How to Remove duplicates line in the txt files
Vic Drastik <user@[EMA  2008-02-13 19:58:24 
Re: How to Remove duplicates line in the txt files
ArarghMail802NOSPAM@[EMAI  2008-02-13 05:12:59 
Re: How to Remove duplicates line in the txt files
ArarghMail802NOSPAM@[EMAI  2008-02-12 23:02:48 
Re: How to Remove duplicates line in the txt files
Happy Trails <nomail@[  2008-02-14 15:50:19 
Re: How to Remove duplicates line in the txt files
foxidrive <gotcha@[EMA  2008-02-14 20:57:45 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-14 08:19:34 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-14 10:01:40 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-14 15:14:50 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-14 23:09:23 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-15 08:31:26 
Re: How to Remove duplicates line in the txt files
Jon Ripley <no.more@[E  2008-02-15 15:27:09 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-15 15:35:34 
Re: How to Remove duplicates line in the txt files
foxidrive <gotcha@[EMA  2008-02-16 15:34:10 
Re: How to Remove duplicates line in the txt files
"Tom Lake" <  2008-02-15 12:56:29 
Re: How to Remove duplicates line in the txt files
Esra Sdrawkcab <admin@  2008-02-15 19:19:16 
Re: How to Remove duplicates line in the txt files
Adam <no@[EMAIL PROTEC  2008-02-15 13:05:20 
Re: How to Remove duplicates line in the txt files
"Stephen J. Rush&quo  2008-02-12 12:46:54 
Re: How to Remove duplicates line in the txt files
"Auric__" <n  2008-02-12 23:24:58 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-12 19:29:09 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-18 14:29:17 
Re: How to Remove duplicates line in the txt files
Derek <derekrss@[EMAIL  2008-02-13 22:36:32 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-14 08:00:58 
Re: How to Remove duplicates line in the txt files
ppnerkDELETETHIS@[EMAIL P  2008-02-14 14:51:33 
Re: How to Remove duplicates line in the txt files
"Stephen J. Rush&quo  2008-02-14 19:56:18 
Re: How to Remove duplicates line in the txt files
Ted Davis <tdavis@[EMA  2008-02-15 08:28:34 
Re: How to Remove duplicates line in the txt files
Derek <derekrss@[EMAIL  2008-02-15 19:47:07 
Re: How to Remove duplicates line in the txt files
ppnerkDELETETHIS@[EMAIL P  2008-02-16 09:48:51 
Re: How to Remove duplicates line in the txt files
Derek <derekrss@[EMAIL  2008-02-18 10:21:09 
Re: How to Remove duplicates line in the txt files
ak621@[EMAIL PROTECTED]   2008-02-26 14:38:23 
Re: How to Remove duplicates line in the txt files
"Todd Vargo" &l  2008-02-11 02:43:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 12:58:53 CDT 2008.