in reply to Re^2: replace \n with space to join indented lines
in thread replace \n with space to join indented lines
If you want a one-liner, put it all on one line!
perl -i.bak -e "local $/; $_=<>; 1 while s/^(([ ]+)(?![ ])[^\n]+)\n\2( +?![ ])/$1/m; print" myfile.txt
|
|---|