Thursday, April 25, 2024
HomeGolangGetting traces with widespread emails - Getting Assist

Getting traces with widespread emails – Getting Assist


hello, so i’m new to golang.i need to filter 2 information that i’ve. first incorporates record of emails (like 2 Million ish) and second incorporates e mail:hash (about 500k ish). i need to examine each information line by line if e mail 2nd file in in first file than i need to export that e mail:hash in to third file. E.g
first.txt

testemail@take a look at.com
take a look at@gmail.com
take a look at@yahoo.com
take a look at@outlook.com
take a look at@dwell.com

second.txt

take a look at@yahoo.com:53534535$5435345
take a look at@outlook.com:23534535$5864345
test1@outlook.com:23534535$586745
test5@outlook.com:23534535$5864345

it ought to output a 3rd file with contents

take a look at@yahoo.com:53534535$5435345
take a look at@outlook.com:23534535$5864345

emails which can be current in first file.

Hello! Are the 2 information ordered? (At the very least the second?) From what I see: no. Proper?

Properly, there are various methods to do this:

  1. First file2 and create a dictionary with e mail addr as key.
  2. Cross this dictionary to a routine that learn file1 and search the present line within the map. It it’s discovered, write it to 3rd file

You should use goroutines and channels.

hiya, they aren’t ordered.

My resolution, attempt it. Compile and run giving it mails file, mails&hash file and output file paths

1 Like

@Metalymph ty mate. you’re a savior.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments