GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How do you do this? (https://gfy.com/showthread.php?t=1061506)

Mr Pheer 03-17-2012 02:35 PM

How do you do this?
 
I have 2 text files on a windows machine.

Lets call the first one "A"
Lets call the second one "B"

A is just a list of usernames that dont work
B is a master list of usernames

I need to write a new file, lets call it "C"

C needs to be a list of usernames that do work

So, if a username in "A" matches a username in "B", remove it
Output the good list to "C"

Complicated way to explain a simple process.

Anybody know an app that does it?

Brujah 03-17-2012 02:40 PM

On a *nix machine (linux/mac) you could use COMM

Harmon 03-17-2012 02:40 PM

I am pretty sure UltraEdit can be configured to do this.

EDIT: http://www.ultraedit.com/downloads/u..._download.html

Fully functional trial download. Give it a shot

Brujah 03-17-2012 02:47 PM

If you can copy both (sorted) files to a server and can use the command line, this should give you the info you want.

comm -13 broken.txt master.txt > working.txt

if you need to sort the files on the server side do this first
sort broken.txt -o broken.txt
sort master.txt -o master.txt

Mr Pheer 03-17-2012 02:48 PM

Quote:

Originally Posted by Harmon (Post 18829699)
I am pretty sure UltraEdit can be configured to do this.

EDIT: http://www.ultraedit.com/downloads/u..._download.html

Fully functional trial download. Give it a shot

I have ultraedit but I've never seen how it can do this.

Brujah 03-17-2012 02:49 PM

Windows equivalent commands according to this are COMP and FC. Maybe that'll help.
http://ss64.com/bash/comm.html

Mr Pheer 03-17-2012 02:53 PM

Quote:

Originally Posted by Brujah (Post 18829708)
Windows equivalent commands according to this are COMP and FC. Maybe that'll help.
http://ss64.com/bash/comm.html

Thanks I'll try this out

Mr Pheer 03-17-2012 06:52 PM

Quote:

Originally Posted by Brujah (Post 18829706)
If you can copy both (sorted) files to a server and can use the command line, this should give you the info you want.

comm -13 broken.txt master.txt > working.txt

if you need to sort the files on the server side do this first
sort broken.txt -o broken.txt
sort master.txt -o master.txt

Hey are you sure thats correct?

Cause now its like, they are almost all bad accounts.

Jesus christ half my traffic died.

u-Bob 03-17-2012 07:31 PM

findstr /G:A.txt /V B.txt > clean.txt

try that.

(untested....)

edit: tested

Brujah 03-17-2012 07:42 PM

Quote:

Originally Posted by Mr Pheer (Post 18829957)
Hey are you sure thats correct?

Cause now its like, they are almost all bad accounts.

Jesus christ half my traffic died.

Should be right. I just created some test files:

broken.txt (sorted)
------------
brujah

master.txt (sorted)
-------------
brujah
edgar
mrpheer

comm -13 broken.txt master.txt:
edgar
mrpheer

Mr Pheer 03-17-2012 10:23 PM

Hmmm maybe its something else then

anyway, the list is smaller so thats good

grumpy 03-18-2012 02:21 AM

import in excel and sort

Dvae 03-18-2012 04:39 AM

Quote:

Originally Posted by Mr Pheer (Post 18829707)
I have ultraedit but I've never seen how it can do this.

In UltraEdit.
Open both files
File>Sort>Advanced Sort Options

From the Dialog
tick Merge Sort Results
tick Remove Duplicates

That should do it.


All times are GMT -7. The time now is 06:44 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123