删除.H1开头的行之下的空行

删除.H1开头的行之下的空行

Content #

现有如下文本: .H1 “On Egypt”

Napoleon, pointing to the Pyramids, said to his troops: “Soldiers, forty centuries have their eyes upon you.”

现在要删除.H1开头的行之下的空行,但不能删除文档中其它部分的空行,用sed 来处理,该写什么样的脚本?

/^\.H1/{
n
/^$/d
}