3
我的bash脚本正在从具有逐行条目的file1.txt粘贴到CSVformat中。例如:bash粘贴不保留换行符
FILE1.TXT包含文本:
John
21-2-2015
some city
"108 Brent Street
Ridgewoods
sometown
somecountry"
一个CSV上传转换后的输出应该是这样的:
John,21-2-2015,some city,"108 Brent Street
Ridgewoods
sometown
somecountry"
但是我的代码,将其转换为:
John,21-2-2015,some city,"108 Brent Street Ridgewoods sometown somecountry"
我想保留换行符。
我的代码:
paste -sd, file1.txt > file2.csv
你先生..的
FPAT
功能保存了我的日子确实如此。 – user1659329 2015-02-24 15:47:45