Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
62,724
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. %%%%%%%%%%@yahoo.com
  2. %%%%%%@wanadoo.fr
  3. %%%%raviplywoodglasscentre@yahoo.comravi
  4. %%nameemail%%@yahoo.com
  5. %.getincontact@numberland.com
  6. %0dronbracale@roadrunner.com
  7. %1%3@example.com
  8. %1@elsewhere.com
  9. %1@example.com
  10.  
  11. {"email":"%%%%%%%%%%@yahoo.com"}
  12. {"email":"%%%%%%@wanadoo.fr"}
  13. {"email":"%%%%raviplywoodglasscentre@yahoo.comravi"}
  14. {"email":"%%nameemail%%@yahoo.com"}
  15.  
  16. awk '{ printf("{"email":"%s"}", $l);}' test
  17.  
  18. $ sed 's/.*/{"email:"&"}/' file
  19. {"email:"%%%%%%%%%%@yahoo.com"}
  20. {"email:"%%%%%%@wanadoo.fr"}
  21. {"email:"%%%%raviplywoodglasscentre@yahoo.comravi"}
  22. {"email:"%%nameemail%%@yahoo.com"}
  23. {"email:"%.getincontact@numberland.com"}
  24. {"email:"%0dronbracale@roadrunner.com"}
  25. {"email:"%1%3@example.com"}
  26. {"email:"%1@elsewhere.com"}
  27. {"email:"%1@example.com"}
  28.  
  29. sed -i 's/.*/{"email:"&"}/' *
  30.  
  31. sed -i.old 's/.*/{"email:"&"}/' *
  32.  
  33. awk -v format='{"email":"%s"}n' '{printf format, $1}
  34.  
  35. sed -e 's/(.*)/{"email":"1"}/g' a.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement