2018-12-20 12:47:04 +00:00
# textutil
> Used to manipulate text files of various formats.
2021-01-31 17:05:18 +00:00
- Display information about `foo.rtf` :
2018-12-20 12:47:04 +00:00
`textutil -info {{foo.rtf}}`
2021-01-31 17:05:18 +00:00
- Convert `foo.rtf` into `foo.html` :
2018-12-20 12:47:04 +00:00
`textutil -convert {{html}} {{foo.rtf}}`
- Convert rich text to normal text:
`textutil {{foo.rtf}} -convert {{txt}}`
2021-01-31 17:05:18 +00:00
- Convert `foo.txt` into `foo.rtf` , using Times 10 for the font:
2018-12-20 12:47:04 +00:00
`textutil -convert {{rtf}} -font {{Times}} -fontsize {{10}} {{foo.txt}}`
2021-01-31 17:05:18 +00:00
- Load all RTF files in the current directory, concatenates their contents, and writes the result out as `index.html` with the HTML title set to "Several Files":
2018-12-20 12:47:04 +00:00
`textutil -cat {{html}} -title "Several Files" -output {{index.html}} *.rtf`