Advertisement
Guest User

Untitled

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