in reply to Re^3: Two line match
in thread Two line match

Thank you for the suggestion, but it only takes two lines and converts it into 1. I would like a one-liner to convert any number of lines of:

------

into one line of it. Jeff

Replies are listed 'Best First'.
Re^5: Two line match
by grizzley (Chaplain) on Mar 10, 2008 at 18:17 UTC

    Understood.

    perl -p0 -e 's/-----\n(\n|-----\n)*-----\n/-----\n/g' file.txt