Welcome

Troves being gleaned while surfing on the Internet mostly about computer/IT/system skills and tricks, Welcome here ...
Powered By Blogger

Disclaimer

This blog is written by the owner with real practices and tests and intended to hold all original posts except there is a clear declaration for referencing from others. Thanks for tagging with the source link or other tips for reference from here if you would like to quote partial or full text from posts in this blog.

Tuesday, February 8, 2011

remove empty line by sed or in vim

In vim, following the same trick for general sustitution:
:%s/^[\ \t]*\n//g 

By sed on the command line:
cat orgfile | sed /^$/d

No comments: