我想知道如何使用 sed 单行只打印出每个段落的第一个单词。在这种情况下,段落由 2 个换行符之后的文本定义。
例如
This is a paragraph with some text. Some random text that is not really important.
This is another paragraph with some text.
However this sentence is still in the same paragraph.
这应该转换为
This
This