pasteコマンドで複数行を一行にまとめる方法
Nid: 910
入力データ
$ curl -sS "http://www.billboard.com/rss/charts/hot-100" | sed -n -e 's/<title>\([0-9]\+:.*\)<\/title>.*/\1/p' | head | cut -d: -f2 | tee billboardtop10.txt Bad And Boujee Shape Of You Closer Bad Things I Don't Wanna Live Forever (Fifty Shades Darker) Black Beatles Don't Wanna Know Starboy Fake Love Scars To Your Beautiful
sオプションを使用して、カンマ区切りで結合
$ paste -d, -s billboardtop10.txt Bad And Boujee, Shape Of You, Closer, Bad Things, I Don't Wanna Live Forever (Fifty Shades Darker), Black Beatles, Don't Wanna Know, Starboy, Fake Love, Scars To Your Beautiful