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