Remove empty lines in VI using SED

Solved
pcsystemd Posted messages 734 Status Member -  
 Yeah -
Hello,

I can’t remember the command to delete empty lines with sed in VI. I tried the following code, but it doesn’t work.

s/^$/d


Do you have any ideas?

Thank you
--
Access to knowledge is the first freedom that every person should have.
Configuration: Linux Mozilla 1.9.0.4

2 answers

  1. jipicy Posted messages 40842 Registration date   Status Moderator Last intervention   4 898
     
    Hi,
    :g/^$/d
    ;-))

    --
    $ man woman
    There is no manual page for woman.
    21
    1. Yeah
       
      Ty
      0
  2. pcsystemd Posted messages 734 Status Member 23
     
    Thank you very much jipicy.

    --
    Access to knowledge is the first freedom that every man should have.
    1