This question already has an answer here:
I have the following data in multiple lines:
foo
bar
qux
zuu
sdf
sdfasdf
What I want to do is to convert them with one line and comma separated:
foo,bar,qux,zuu,sdf,sdfasdf
What's the best unix one-liner to do that?
</div>
转载于:https://stackoverflow.com/questions/15758814/turning-multiple-lines-into-one-line-with-comma-separated-perl-sed-awk