perl -p -e 'BEGIN { undef $/ } s/\n{2,}/\n/g'
Which can be shortened to:
See perldoc perlrun for details of perl's -0 option.perl -p0777e 's/\n{2,}/\n/g'
In reply to Re^3: newlines in regular expressions
by eyepopslikeamosquito
in thread newlines in regular expressions
by gitarwmn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |