unix - Replace new lines character which are in quotas in file using sed -
i have been exported file open office csv. long text in cell have new line characters. rows cell text looks in csv
;;;;ddsfaads;;dsfaadsfdas;" dfsafdas fdadfsdaf fddsfaadfs fdsfadsadsfadf "
how it?
you can use way ,
sed '/"/{:a;n;/\n.*"/{s/\n/ /g;p;d;t};s/\n/ /g; t a};' filename
Comments
Post a Comment