Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Daniel,Rose,DR@example.com,http://www.example.com,1234567890
  2. Daniel1,Rose,DR1@example.com,http://www.example.com,1234567890
  3. Daniel2,Rose,DR2@example.com,http://example.com,1234567890
  4. Daniel3,Rose,DR3@example.com,www.example.com,1234567890
  5. Daniel4,Rose,DR4@example.com,1234567890,example.com
  6.  
  7. DR@example.com
  8. http://www.example.com
  9. DR1@example.com
  10. http://www.example.com
  11. DR3@example.co
  12. www.example.com
  13. DR4@example.com
  14.  
  15. $ sed -r 's|.*,([^,]+@[^0-9]+),.*|1|' file | tr ',' 'n'
  16. DR@example.com
  17. http://www.example.com
  18. DR1@example.com
  19. http://www.example.com
  20. DR2@example.com
  21. http://example.com
  22. DR3@example.com
  23. www.example.com
  24. DR4@example.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement