Convert text file into a comma delimited string

前端 未结 5 687
南旧
南旧 2021-02-06 17:25

I don\'t seem to locate an SO question that matches this exact problem.

I have a text file that has one text token per line, without any commas, tabs, or quotes. I want

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-06 18:13

    You can do it entirely with bash parameter expansion operators instead of using tr and sed.

    csv_string=$(

提交回复
热议问题