Advertisement
Guest User

Untitled

a guest
Jan 24th, 2016
1,835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 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. steampowered.com - username=steamaccountereed
  32. x-kom.pl - login=exampleelog
  33.  
  34. Choose mail to send a massage:
  35. mailhotmail@hotmail.com
  36. adresmail@gmail.com
  37.  
  38. Choose site :
  39. steampowered.com - username=steamaccountereed
  40. x-kom.pl - login=exampleelog
  41.  
  42. $ cat tst.awk
  43. { $0 = tolower($0) }
  44. sub(/^(login|username)=/,"") { vals["LOGINS"][$0] }
  45. { sub(/^email=/,"") }
  46. /@/ { vals["EMAILS"][$0] }
  47. /./ { sub(/[^@]+@/,""); vals["SITES"][$0] }
  48. END {
  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
  58. SITES:
  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
  69. LOGINS:
  70. mailhotmail@hotmail.com
  71. steamaccountereed
  72. exampleelog
  73. EMAILS:
  74. adresemail@gmail.com
  75. mailhotmail@hotmail.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement