wiki:linux

Version 1 (modified by yuna, 10 years ago) (diff)

--

リストをCSVに変換

# cat test.txt
aaa
bbb
ccc
ddd

# sed ':loop; N; $!b loop; ;s/\n/,/g' test.txt
aaa,bbb,ccc,ddd