Getting a text file rid of all superfluous blank lines

Amadeus W. M. amadeus84 at cablespeed.com
Wed Nov 30 15:06:27 UTC 2005


On Wed, 30 Nov 2005 11:00:33 +0000, Paul Smith wrote:

> Dear All
> 
> Taking a text file, how can one eliminate at once all superfluous blank lines?
> 
> Thanks in advance,
> 
> Paul

grep . filename

or

cat filename | sed '/^[ \t]*$/d'






More information about the fedora-list mailing list