Article 4ZHDE [bash] comma-separated output

[bash] comma-separated output

by
schneidz
from LinuxQuestions.org on (#4ZHDE)
hi, how does one create a comma-separated output. this doesnt work as intended ?:
Code:[schneidz@test]$ ls -1 | tr '\n' ' ' | awk -v OFS=',' '{print $0}'
0.lst 10.lst 11.lst 12.lst 13.lst 14.lst 15.lst 16.lst 17.lst 18.lst 19.lst 1.lst 20.lst 21.lst 22.lst 23.lst 24.lst 25.lst 2.lst 3.lst 4.lst 5.lst 6.lst 7.lst 8.lst 9.lstlatest?d=yIl2AUoC8zA latest?i=7ntqlF0Dytk:WuArQG21npY:F7zBnMy latest?i=7ntqlF0Dytk:WuArQG21npY:V_sGLiP latest?d=qj6IDK7rITs latest?i=7ntqlF0Dytk:WuArQG21npY:gIN9vFw7ntqlF0Dytk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments