in reply to Re^2: removing empty lines
in thread removing empty lines
Your substitute command is only operating on a single line. After it has removed all characters from the line, you are still left with a blank line. The "next if blank" approach works best for removing unwanted lines in my opinion.