1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-28 19:44:56 +02:00
tldr/pages.zh/osx/textutil.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

662 B

textutil

用于操作各种格式的文本文件.

  • 显示有关 foo.rtf 的信息:

textutil -info {{foo.rtf}}

  • foo.rtf 转换为 foo.html:

textutil -convert {{html}} {{foo.rtf}}

  • 将带格式的 rtf 文本转换为普通 txt 文本:

textutil {{foo.rtf}} -convert {{txt}}

  • foo.txt 转换为 foo.rtf, 字体使用 Times 字号 10:

textutil -convert {{rtf}} -font {{Times}} -fontsize {{10}} {{foo.txt}}

  • 加载当前目录中的所有 RTF 文件,连接其内容,并将结果作为 index.html 写入,HTML 标题设置为"多个文件":

textutil -cat {{html}} -title "多个文件" -output {{index.html}} *.rtf