Guest User

Untitled

a guest
May 16th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. tr ' ' ',' <input >output
  2.  
  3. tr -s 't' <input | tr 't' ',' >output
  4.  
  5. awk '{$1=$1}1' OFS=","
  6.  
  7. sed 's/[:space:]+/,/g' orig.txt > modified.txt
  8.  
  9. sed 's/[:blank:]+/,/g' orig.txt > modified.txt
  10.  
  11. sed 's/[t ]+/,/g' orig.txt > modified.txt
  12.  
  13. cat texte.txt | sed -e 's/s/,/g' > texte-new.txt
  14.  
  15. sed -e 's/s/,/g' texte.txt > texte-new.txt
  16.  
  17. $ cat texte.txt
  18. this is a text
  19. in which I want to replace
  20. spaces by commas
  21.  
  22. $ cat texte-new.txt
  23. this,is,a,text
  24. in,which,I,want,to,replace
  25. spaces,by,commas
  26.  
  27. sed "s/s/,/g" < infile.txt > outfile.txt
  28.  
  29. sed 's/[t ]/,/g' input.file
  30.  
  31. sed -i 's/[t ]/,/g' input.file
Add Comment
Please, Sign In to add comment