Advertisement
Guest User

Untitled

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