->Title Page
->Vi editor
-->Vi reference
-->Miscellaneous tips
--->Line deletions
--->Switching cases
--->Spell checking
--->Advanced S and R
->Blank lines
->Mirror sites
->Further reading

[ Up ]

Vi ---> Removing blank lines

Blank lines can be removed from a file with any of the following:



    :%!cat -s

    :%!sed /./,/^$/!d
Be aware that you may need to get rid of trailing whitespace first. This can be accomplished with

    :%s/[ ^I]*$/!d

Site Statistics

t a y l o r@l i n u x b o x.c o m

© 1993-1998 Christopher C. Taylor