· 10 years ago · Jan 24, 2016, 03:36 PM
1otf.msn.com
2otf.msn.com
3accounts.google.com
4Email=adresemail@gmail.com
5www.x-kom.pl
6login=exampleelog
7allegro.pl
8ssl.allegro.pl
9www.bing.com
10www.bing.com
11www.bing.com
12www.bing.com
13store.steampowered.com
14username=steamaccountereed
15login.live.com
16login=mailhotmail@hotmail.com
17www.bing.com
18
19grep -oP '(K[^)]*|(user=|username=|Email=|login=)[^&]*' file.txt
20
21grep -P '^(?=.*@.*)' file.txt
22
23if "its username or mail"
24 if [email condtion]
25 then write emails to emails tab
26else
27write to users tab
28else
29 write it to 'site' table
30
31steampowered.com - username=steamaccountereed
32 x-kom.pl - login=exampleelog
33
34Choose mail to send a massage:
35mailhotmail@hotmail.com
36adresmail@gmail.com
37
38Choose site :
39steampowered.com - username=steamaccountereed
40x-kom.pl - login=exampleelog
41
42$ cat tst.awk
43{ $0 = tolower($0) }
44sub(/^(login|username)=/,"") { vals["LOGINS"][$0] }
45{ sub(/^email=/,"") }
46/@/ { vals["EMAILS"][$0] }
47/./ { sub(/[^@]+@/,""); vals["SITES"][$0] }
48END {
49 for (type in vals) {
50 print type ":"
51 for (val in vals[type]) {
52 print "t" val
53 }
54 }
55}
56
57$ awk -f tst.awk file
58SITES:
59 www.bing.com
60 allegro.pl
61 gmail.com
62 accounts.google.com
63 hotmail.com
64 otf.msn.com
65 www.x-kom.pl
66 login.live.com
67 store.steampowered.com
68 ssl.allegro.pl
69LOGINS:
70 mailhotmail@hotmail.com
71 steamaccountereed
72 exampleelog
73EMAILS:
74 adresemail@gmail.com
75 mailhotmail@hotmail.com