textutil
Textutil is a command line tool in macOS that allows users to manipulate text files in various formats. It is designed to perform conversions between different types of text file formats, such as HTML, RTF, TXT, and DOCX.
The tool offers several functionalities, including the ability to convert files from one format to another. For example, it can convert an RTF file to HTML or a DOCX file to plain text.
Textutil also enables users to combine multiple files into a single document. With this feature, users can merge different text files or concatenate multiple pages of a document into one cohesive file.
Moreover, the tool facilitates the extraction of textual content from complex file formats, such as DOCX or RTF. Users can extract the text from these files and save them in a simpler and more accessible format, such as plain text or HTML.
Textutil supports specifying output options, allowing users to customize formatting and conversion settings. Users can define parameters like font size, style, encoding, and page format for the output file.
This command line tool is highly flexible and can be utilized in various scripting and automation tasks, making it valuable for system administrators, developers, and power users.
Overall, textutil simplifies text file manipulation, conversion, and extraction processes, enhancing productivity in macOS command line environments.
List of commands for textutil:
-
textutil:tldr:075af textutil: Convert `foo.txt` into `foo.rtf`, using Times 10 for the font.$ textutil -convert ${rtf} -font ${Times} -fontsize ${10} ${path-to-foo-txt}try on your machineexplain this command
-
textutil:tldr:399c8 textutil: Convert `foo.rtf` into `foo.html`.$ textutil -convert ${html} ${path-to-foo-rtf}try on your machineexplain this command
-
textutil:tldr:60623 textutil: 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".$ textutil -cat ${html} -title "Several Files" -output ${path-to-index-html} *.rtftry on your machineexplain this command
-
textutil:tldr:ab761 textutil: Display information about `foo.rtf`.$ textutil -info ${path-to-foo-rtf}try on your machineexplain this command