Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tr ' ' ',' <input >output
- tr -s 't' <input | tr 't' ',' >output
- awk '{$1=$1}1' OFS=","
- sed 's/[:space:]+/,/g' orig.txt > modified.txt
- sed 's/[:blank:]+/,/g' orig.txt > modified.txt
- sed 's/[t ]+/,/g' orig.txt > modified.txt
- cat texte.txt | sed -e 's/s/,/g' > texte-new.txt
- sed -e 's/s/,/g' texte.txt > texte-new.txt
- $ cat texte.txt
- this is a text
- in which I want to replace
- spaces by commas
- $ cat texte-new.txt
- this,is,a,text
- in,which,I,want,to,replace
- spaces,by,commas
- sed "s/s/,/g" < infile.txt > outfile.txt
- sed 's/[t ]/,/g' input.file
- sed -i 's/[t ]/,/g' input.file
Add Comment
Please, Sign In to add comment