PDA

View Full Version : Remove empty lines/spaces


caspert_ghost
17th May 2007, 17:53
Hello and thank you for your assistance.

I am very new to ubuntu and I have been playing around with it these past few days.

whenever I vi (edit) an item I sometimes make a mistake, when I clear the contents of that line I end up with a blank or empty line.
Could you please tell me the code (command) to remove these empty lines.

Ubuntu 7.04 Server edition

Thank you

caspert_ghost
18th May 2007, 07:27
I have (after pressing various buttons to test) have found a way to remove the empty lines created by accident or by removing text...

I hit +/= key twice and hit enter.. for me this works.

till
18th May 2007, 11:03
Or you put the cursor in the empy line and enter:

dd

to remove the complete line.