, ?
, . , , .
, python :
import csv
import sys
with open(sys.argv[1]) as csvfile:
reader = csv.reader(csvfile)
for row in reader:
stripped = [col.replace('\n', ' ') for col in row]
print(','.join(stripped))
, , .
:
id,name
01,"this is
with newline"
02,no newline
, , :
➜ ~ ./test.py input.csv
id,name
01,this is with newline
02,no newline
python script - . python , .
, (, this iswith newline), , , ''.