> Howdy! In seveda v perl onelinerju :) perl -pi -e 'BEGIN{undef $/}; s/(^|\n).+?\n.+?(\n\s*\n)+/$1/gm' file