Getting a text file rid of all superfluous blank lines
Guy Fraser
guy at incentre.net
Thu Dec 1 20:38:33 UTC 2005
On Wed, 2005-30-11 at 23:44 +0800, John Summerfied wrote:
> Paul Smith wrote:
> > Dear All
> >
> > Taking a text file, how can one eliminate at once all superfluous blank lines?
> >
> > Thanks in advance,
> >
> > Paul
> >
> man cat
> man grep
>
>
> --
>
> Cheers
> John
>
> -- spambait
> 1aaaaaaa at computerdatasafe.com.au Z1aaaaaaa at computerdatasafe.com.au
> Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/
>
> do not reply off-list
sed -e 's;^\w*$;;' file-to-clean | grep -v '^$'
More information about the users
mailing list