linux - Linux/nix:使用 pr 格式化文本 - 如何添加换行符?
问题描述
我pr(1)
用来玩格式化文本文件。我的问题是包含长行的文本文件不会自动换行并继续。在下一行。考虑例如尝试准备pr
要打印在 A4 页面上的文本。我已经检查了手册页,但我很困惑。一定有办法吗?
一个说明性的例子:
$ pr -n letter
2021-02-23 08:39 letter Page 1
1 Hi,
2
3 This is a letter with very a long line. It's made to prove my point. This would not fit e.g. an A4-paper. How do I make ``pr`` automatically insert new lines/prepare the text so that it will be possible to read?
4
5 All the best,
6 pr
我要寻找的是这样的输出:
$ pr -n letter
2021-02-23 08:39 letter Page 1
1 Hi,
2
3 This is a letter with very a long line. It's made to prove my
4 point. This would not fit e.g. an A4-paper. How do I make ``pr``
5 automatically insert new lines/prepare the text so that it will
6 be possible to read?
7
8 All the best,
9 pr
pr
欣赏大师们的所有提示和技巧。
解决方案
推荐阅读
- angular - Angular2如何根据activatedRoute的queryParams呈现不同的模板
- javascript - Mongoose 保存除一个以外的所有更新
- pytest - 标记一个 Pytest 夹具而不是使用该夹具的所有测试
- cognos - Cognos 11.0.13 DMR 交叉表,当有两个事实时,如何为正确的年份设置钻取 - Current Year Sales 和 Prev Year Sales
- python - 带有 pd 库的数据对象类型
- mysql - 来自 mysql db 的多种类型的信息显示
- swift - 如何在警报中访问 Uitextfield 的文本?
- azure-functions - Azure 持久功能和数据保留
- microsoft-teams - Microsoft Teams 自适应卡片 Input.ChoiceSet Apostrophe 以不同方式呈现
- node.js - 如何安装盖茨比?