in reply to Re^2: how to use matching operator on newlines
in thread how to use matching operator on newlines
I don't think that accomplishes the goal.
It depends upon which of the stated goals you focus on. The op's description started with
I have a unix-formatted double spaced file, so each line of text is followed by 2 linefeeds,...
And if that is an accurate statement of the problem, my one-liner will work.
If it's not accurate, or omits significant details, then it won't and a slightly more sophisticated one-liner is required:
perl -e"BEGIN{$/=qq[\n\n]}" -ne"chop;print" junk.txt
|
|---|