Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. ...some content...
  2. The mail system
  3.  
  4. <slavicatomic118@hotmail.com>: host mx1.hotmail.com[65.54.188.94] said: 550
  5. Requested action not taken: mailbox unavailable (in reply to RCPT TO
  6. command)
  7.  
  8. ...some content...
  9. The mail system
  10.  
  11. <oki88@optimumpro.net>: host viking.optimumpro.net[79.101.51.82] said: 550
  12. Unknown user (in reply to RCPT TO command)
  13.  
  14. ...some content...
  15. The mail system
  16.  
  17. <sigirna_luka@yahoo.com>: host mta5.am0.yahoodns.net[74.6.140.64] said: 554
  18. delivery error: dd This user doesn't have a yahoo.com account
  19. (sigirna_luka@yahoo.com) [0] - mta1172.mail.sk1.yahoo.com (in reply to end
  20. of DATA command)
  21.  
  22. ...etc.
  23.  
  24. grep -A 2 "The mail system" mbox_file
  25.  
  26. grep -A 2 -B -2 "The mail system" mbox_file
  27.  
  28. grep: -2: invalid context length argument
  29.  
  30. grep -A 4 "The mail system" temp.txt | grep -v "The mail system" | grep -v '^d*$'
  31.  
  32. sed -n '/The mail system/{n;n;p}'
  33.  
  34. sed -n '/The mail system/{n; n;p; n;p; n;p}'
  35.  
  36. sed -n '/The mail system/{n;n;N;N;p}'
  37.  
  38. sed -n '/The mail system/{n;n;N;N;p;i--
  39. }' > output-file # or | ...
  40.  
  41. <slavicatomic118@hotmail.com>: host mx1.hotmail.com[65.54.188.94] said: 550
  42. Requested action not taken: mailbox unavailable (in reply to RCPT TO
  43. command)
  44. --
  45.  
  46. grep -A 2 -B -2 "The mail system" mbox_file
  47.  
  48. grep -A 2 -B 2 "The mail system" mbox_file # This will work please check
  49.  
  50. grep -A 2 "The mail system" mbox_file | tail -n +3
  51.  
  52. perl -ne 'print if( (/The mail system/ && ($end=1))..!$end-- )'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement