Getting a text file rid of all superfluous blank lines

Kenneth Porter shiva at sewingwitch.com
Thu Dec 1 22:18:23 UTC 2005


--On Thursday, December 01, 2005 1:38 PM -0700 Guy Fraser 
<guy at incentre.net> wrote:

> sed -e 's;^\w*$;;' file-to-clean | grep -v '^$'

Why not use egrep to do it in one pass? Something like:

egrep -v '^\w*$' file-to-clean





More information about the fedora-list mailing list