Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> File Line Checker, no idea of its proper name.
toby
post Oct 8 2007, 04:19 PM
Post #1


Super Member
Group Icon

Group: Members
Posts: 515
Joined: 29-September 06
Member No.: 16,228



Can't really Google what I can't name sad.gif

I have a massive file of urls, which I want to make sure there is only one of each in. Not really bothered what its in, even js or php script, or something to google would be brilliant.
Go to the top of the page
 
+Quote Post
Jimmy89
post Oct 8 2007, 11:18 PM
Post #2


Living at the Datacenter
Group Icon

Group: [HOSTED]
Posts: 696
Joined: 30-June 06
From: Australia
Member No.: 14,219



So you are looking for duplicate lines in the same file? A very time consuming method would be to put all the links in a document editor (Notepad, Winword for Windows, Openoffice, gedit for Linux) and search for the url's, if there is a second copy, remove it.

Many of the Duplicate Finders (search google) that are on the internet deal with actual files, and not just lines.
Go to the top of the page
 
+Quote Post
vujsa
post Oct 9 2007, 04:20 AM
Post #3


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714



Well, there are a couple of ways to do this.
The first is to write a script that reads the file, puts the contents in an array (seperated by line) then do a duplicate value check on the array. Then rewrite the file from the cleaned array.

The second is to copy the conents of your file and paste in a spreadsheet. Sort the spreadsheet and then evaluate the data after it is sorted. You can manually check to see if there are duplicates as the copy would be right below it. You could automate the search by using a spreadsheet formula to make a copy of the entry in the next column over only if the entry above it is not the same. Then your new column of data would be free of duplicates but might have a hole or two where the duplicate entry wasn't copied over. I use this method frequently for various lists.
Also, instead of copying the entry to the next column if there isn't a match, you could print a message if there is a match in the row above then just delete the duplicate line.

Hope this helps.
vujsa
Go to the top of the page
 
+Quote Post
kelvinmaki
post Oct 9 2007, 05:32 AM
Post #4


Advanced Member
Group Icon

Group: Members
Posts: 170
Joined: 30-July 07
Member No.: 23,704



QUOTE(vujsa @ Oct 9 2007, 04:20 AM) *
The second is to copy the conents of your file and paste in a spreadsheet. Sort the spreadsheet and then evaluate the data after it is sorted. You can manually check to see if there are duplicates as the copy would be right below it. You could automate the search by using a spreadsheet formula to make a copy of the entry in the next column over only if the entry above it is not the same. Then your new column of data would be free of duplicates but might have a hole or two where the duplicate entry wasn't copied over. I use this method frequently for various lists.
Also, instead of copying the entry to the next column if there isn't a match, you could print a message if there is a match in the row above then just delete the duplicate line.


Actually this is 1 way to do it and its a great way to do it. And if you are using Microsoft Excel, then you can use advance filter function that will filter all duplicates. So don't have to manually look through your data. Steps will be:

1. Sorting all data.
2. Trim all data without any spaces at the end.
2. Click on Data -> Filter -> Advance Filter.
3. Select Action: Filter the list, in-place.
4. Check on Unique records only.
5. Click ok.

That will basically filter all duplicate records. Hope this help too. And if you are using other spreadsheet, like OpenOffice, you can do that too. But don't know the steps. tongue.gif Cheers
Go to the top of the page
 
+Quote Post
toby
post Oct 10 2007, 04:39 PM
Post #5


Super Member
Group Icon

Group: Members
Posts: 515
Joined: 29-September 06
Member No.: 16,228



Wow.. I've been using excel in college all term and still don't know things like that! Done, ty.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Super File Recover(3)
  2. Counter With Img In Flat File(2)
  3. Deleting A Corrupt File(26)
  4. You Cannot Create A File Named Con(9)
  5. Css File Size(7)
  6. Rapidshare(1)
  7. How To Create Exe File In Java?(13)
  8. How Do You Use The cPanel File Manager?(14)
  9. Restore Windows File And Folder Protection(5)
  10. What Is Mkv? Need Help With This File Format?(7)
  11. Qupis : Free Cpanel Web Hosting (one Line Text Ad At Bottom)(10)
  12. Your Idea About Gears Of War(4)
  13. My Own Os(37)
  14. Is A Php File Searchable?(8)
  15. Recover Tables From A MySQL .frm File(8)
  1. Anyone Willing To Make A Text-based Game With Me?(4)
  2. How To Copy File & Folders From Linux To Windows?.(12)
  3. Uploading Image File Through JSP Code To Server(9)
  4. How To Use Psd File(14)
  5. Need To Edit A Wav File [solved](1)
  6. Mysql And User File_priv(0)
  7. How To Save A Image In Pdf File And Download It?(10)
  8. Need Help Urgently (missing Or Corrupt Hal.dll File).(6)
  9. Safari And Hosts File(8)
  10. Shut Down, Restart, Log Off XP Using A Batch File(23)
  11. Disable Task Manager 1 Line Code![vb6](32)
  12. Problem With Move_uploaded_file()(5)
  13. Re-ordering Welcome Screen & Moving Heavily Fragmented File(1)
  14. Command Line (dos) Tips For Windows Xp(5)
  15. Text File Operations VB.NET(5)


 



- Lo-Fi Version Time is now: 13th October 2008 - 09:32 PM