windows - How to concatenate continuation lines in Perl? -
I have a CSV file that has this type of wire:
ID1; Banana | Apple Oranges
and I think every time a pipe occurs at the beginning of the line, the string will be added to the previous line, the output should be like this:
< Pre> id1, banana | Apple Narrow
a pipe |
?
Post-text "itemprop =" text ">
A liner in a laugh removes the returns before pipes:
perl -ne '$ s = do {local $ /; & lt; & gt;} $ S = ~ s / \ n \ | / | / g; print $ s' file.csv
Comments
Post a Comment