>
> Hmm, maybe:
>
> $ awk '/^comment "[^"]*$/ { ORS=" " } /"$/ { ORS="\n" } { print }'
> yourfile.txt
>
Yes that works (after piping the file thru tr -d '\r' first). Thanks!
On 2021-12-08, Adam Carter wrote:
>
> I want to replace any newlines between 'comment "' and the next '"' with
> spaces so the whole comment is on a single line. How can it be done?
Hmm, maybe:
$ awk '/^comment "[^"]*$/ { ORS=" " } /"$/ { ORS="\n" } { print }' yourfile.txt
That means if a line
On 2021-12-08 17:15:43, Adam Carter wrote:
>
> but sometimes there are newline characters in the comment field;
>
> property "something"
>
> comment "something
>
> something else
>
> a third thing"
>
> I want to replace any newlines between 'comment "' and the next '"' with
> spaces so the wh
3 matches
Mail list logo