![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
So Fucking Banned
Join Date: Jan 2001
Location: http://www.thefly.net/ --- Quit your job and live off steady traffic.
Posts: 11,856
|
UNIX question -- how to sort and remove duplicates?
I have a huge file that's full of tons of duplicate lines -- I want to remove all the duplicate lines from the file.
I did a "man sort" and I didn't see any option to remove/ignore duplicate lines -- Anyone know how to do it? I'm sure it's easy... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
old school fart
Industry Role:
Join Date: May 2001
Location: Florida
Posts: 1,015
|
cat filename.txt|sort|uniq > newfilename.txt
__________________
The next generation of SEO |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
So Fucking Banned
Join Date: Jan 2001
Location: http://www.thefly.net/ --- Quit your job and live off steady traffic.
Posts: 11,856
|
Awesome I did "info sort"
I found it... " `-u' `--unique' Normally, output only the first of a sequence of lines that compare equal. For the `--check' (`-c') option, check that no pair of consecutive lines compares equal." |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
So Fucking Banned
Join Date: Jan 2001
Location: http://www.thefly.net/ --- Quit your job and live off steady traffic.
Posts: 11,856
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Jan 2002
Location: N.Y.C
Posts: 265
|
uniq filename newfilename
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Registered User
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
|
sort < in.txt | uniq > out.txt
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Jan 2002
Location: Toronto, ON, Canada
Posts: 1,081
|
Quote:
Trying to remove all the duplicate emails from a spam list? ![]() J/k dude ![]()
__________________
<a href="http://www2.famoushost.com/home.php" target="_blank"><b><FONT COLOR="FFFF00">www.FamousHost.com</font></b></a><br>Free Hosting With No Headers, Real FTP, <u>Get listed on the biggest TGP's with us!</u> |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Jan 2002
Posts: 2,025
|
Quote:
thats exactly what I was going to say ;p
__________________
LiveBucks / Privatefeeds - Giving you money since 1999 Up to 50% Commission! 25% Webmaster Referal Powered by Gamma |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
rockin tha trailerpark
Industry Role:
Join Date: May 2001
Location: ~Coastal~
Posts: 23,088
|
you know there is some great spam list software out there that can handle multiple millions
![]()
__________________
__________ Loadedca$h - get sum! - Revengebucks - mmm rebills! - webair (gotz sErVrz) ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
So Fucking Banned
Join Date: Jan 2001
Location: http://www.thefly.net/ --- Quit your job and live off steady traffic.
Posts: 11,856
|
If you want to know what I was really doing... I had some code for one of my scripts to periodically remove dead trades -- using a formula -- blah -- anyway the code was buggy and the result was lots of duplicate entries over the course of many months the script still worked fine but the database was getting full of useless records... basically I fixed my code -- but then I needed to repair the database by removing the duplicates...
Anyway thanks for the help... maybe some day I will try some kind of email marketing but so far I've been too lazy to do it... |
![]() |
![]() ![]() ![]() ![]() ![]() |