Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   E-Mail (https://forum.antichat.xyz/forumdisplay.php?f=14)
-   -   Удалить дубликаты мыл из .txt (https://forum.antichat.xyz/showthread.php?t=194009)

Forser 06.04.2010 18:19

Удалить дубликаты мыл из .txt
 
Нужно удалить дубликаты!
Пример список мыл из .txt:
111@mail.ru
222@mail.ru
333@mail.ru
111@mail.ru
222@mail.ru
333@mail.ru

Подскажите чем удалить дубликаты?

wildshaman 06.04.2010 18:20

Text Dublicate Killer (TDK)

satana-fu 06.04.2010 18:25

http://forum.antichat.ru/showpost.php?p=1945926&postcount=10


Смотри сколько ответов было там....

Forser 06.04.2010 18:46

Цитата:

Сообщение от wildshaman
Text Dublicate Killer (TDK)

Благодарю!

CyberHunter 06.04.2010 18:54

EmailGrabber

Redwood 07.04.2010 00:12

Цитата:

Нужно удалить дубликаты!
Пример список мыл из .txt:
111@mail.ru
222@mail.ru
333@mail.ru
111@mail.ru
222@mail.ru
333@mail.ru

Подскажите чем удалить дубликаты?
PHP код:

<?php 
$list 
array_unique(file('list.txt')); 
foreach (
$list as $value)
echo 
"$value </br>";
?>


kaban931 07.04.2010 00:21

как перемешать строки?

Redwood 07.04.2010 00:27

Цитата:

Сообщение от kaban931
как перемешать строки?

PHP код:

<?php
$file 
file ('file.txt');
shuffle ($file);
foreach (
$file as $value)
echo 
"$value </br>";
?>


djoni84 08.04.2010 01:58

http://forum.antichat.ru/thread168432.html вот может подойдёт я постоянно с ней пользуюсь.

shiku 11.04.2010 13:30

KeyWordKeeper и перемешает и удалит дубликаты

YuNi|[c 11.04.2010 14:33

Код:

#!/usr/bin/perl -w
use strict;
my $origfile = shift;
my $outfile = "no_dupes_" . $origfile;
my %hTmp;
open (IN, "<$origfile") or die "Couldn't open input file: $!";
open (OUT, ">$outfile") or die "Couldn't open output file: $!";
while (my $sLine = <IN>) {
next if $sLine =~ m/^\s*$/; #remove empty lines. Without this, still destroys empty lines except for the first one.
$sLine=~s/^\s+//; #strip leading/trailing whitespace
$sLine=~s/\s+$//;
print OUT qq{$sLine\n} unless ($hTmp{$sLine}++);
}
close OUT; close IN;

для дубликата


Время: 03:50