[wellylug] vi / ex question

David Antliff dave.antliff at paradise.net.nz
Tue Dec 7 15:11:50 NZDT 2004


On Tue, 7 Dec 2004 jfouhy at paradise.net.nz wrote:
> How can I delete every blank line in a file?  I can delete the next blank line
> by saying :/^$/d but I don't want to sit here typing that nutil they're all gone..

perl -ni.bak -e'/\S/ && print' file1 file2 ...

-- 
David




More information about the wellylug mailing list