使用 tbl troff/nroff 在 UNIX 中创建表
我想从 UNIX(AIX) 中的一些 CSV 文件创建表并将它们作为邮件(消息正文)发送。 我尝试了以下示例 http://www.snake.net/software/troffcvt/tbl.html 但他们都不适合我。
在我运行文件后,
tbl input-file | troff
我得到的只是这样的东西,(仅粘贴一部分)
V196 Cbr V163 Cbr V130 Cbr n40 0 H240 V388 h689Cbr V370 Cbr V337 Cbr V304 Cbr V271 Cbr V238 Cbr V205 Cbr V172 Cbr V139 Cbr V106 Cbr V73 Cbr V40 Cbr n40 0 x 拖车 V2640 x 停止
我尝试阅读 troff/tbl 的手册页,但没有太多可以进行实验的示例。这里的任何指示都会有帮助。提前致谢。
编辑: 由于它将通过电子邮件发送,我想要 CSV 文件的普通 ASCII 表输出,例如来自 http://www.unix.com/shell-programming-scripting/137830-print-screen- 的用户 drl 帖子table-ascii.html 除了我这里没有 groff :(。
I would like to create tables from some CSV files in UNIX(AIX) and send them as mail(message body).
I tried the examples at
http://www.snake.net/software/troffcvt/tbl.html
but none of them is working for me.
After I run the file as,
tbl input-file | troff
All I get is something like this,(pasting only a part)
V196 Cbr V163 Cbr V130 Cbr n40 0 H240
V388 h689Cbr V370 Cbr V337 Cbr V304
Cbr V271 Cbr V238 Cbr V205 Cbr V172
Cbr V139 Cbr V106 Cbr V73 Cbr V40 Cbr
n40 0 x trailer V2640 x stop
I've tried reading the man pages for troff/tbl but there aren't much examples that I could experiment on. Any directions here would be helpful. Thanks in advance.
Edit:
As It is going to send via email, I would like to have an ordinary ASCII table output of the CSV file like user drl post from http ://www.unix.com/shell-programming-scripting/137830-print-screen-table-ascii.html except that I don't have groff here :(.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有两件事:
例如,如果您想要 HTML 输出,则需要使用类似的内容
如果您想要 Postscript 输出,则需要使用类似的内容
troff 后处理器的名称和可用性可能因平台而异,因此请咨询您当地的 troff文档。
Two things:
For example if you wanted HTML output you'd need to use something like
If you wanted Postscript output you'd need to use something like
The name and availability of troff post-processors may vary slightly from platform to platform, so consult your local troff documentation.