Getting a text file rid of all superfluous blank lines

Andy Green andy at warmcat.com
Wed Nov 30 13:43:15 UTC 2005


Paul Smith wrote:

> Taking a text file, how can one eliminate at once all superfluous blank lines?

Just adding to the ways to do it for the hell of it :-)

cat yourfile | sed /^$/d  > yournewfile

-Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4492 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051130/c7716e63/attachment-0001.bin>


More information about the fedora-list mailing list