![如何使用“>”前缀格式化文本回复](https://linux22.com/image/14346/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E2%80%9C%3E%E2%80%9D%E5%89%8D%E7%BC%80%E6%A0%BC%E5%BC%8F%E5%8C%96%E6%96%87%E6%9C%AC%E5%9B%9E%E5%A4%8D.png)
我有时会收到一封 HTML 电子邮件,我想以带有 ">" 前缀的文本形式进行回复。
当我进行文本回复时,Thunderbird 所做的就是在整个段落中添加一个“>”前缀。例如:
> Mozilla Thunderbird is a free and open-source cross-platform email client, personal information manager, news client, RSS and chat client developed by the Mozilla Foundation. The project strategy was originally modeled after that of the Mozilla Firefox web browser.
Thunderbird 中是否有一个设置会产生以下结果:
> Mozilla Thunderbird is a free and open-source cross-platform
> email client, personal information manager, news client, RSS
> and chat client developed by the Mozilla Foundation. The
> project strategy was originally modeled after that of the
> Mozilla Firefox web browser.
答案1
使用:
fmt -w 65 file |sed -e 's/^>//' -e 's/^/>/'
示例输出:
>Mozilla Thunderbird is a free and open-source cross-platform
>email client, personal information manager, news client,
>RSS and chat client developed by the Mozilla Foundation. The
>project strategy was originally modeled after that of the
>Mozilla Firefox web browser.