daily pastebin goal
84%
SHARE
TWEET

Untitled

a guest May 16th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top