On Mon, Aug 12, 2002 at 01:28:19PM -0400, Selector, Lev Y wrote: > Folks, > > I have a long file which has many "empty" lines > with nothing but may be spaces or tabs (/^\s*$/). > > These lines tend to group together creating chunks > of empty vertical space on the printout. > > I want to reduce the number of empty lines > in such chunks to 1 line. > > What would be an elegant way to do this?
perl -p0377i -e 's/^\s*$//gm' Ronald