NAME
tteexxttuuttiill - text utility
SYNOPSIS
tteexxttuuttiill [commandoption] [otheroptions] file ...DESCRIPTION
tteexxttuuttiill can be used to manipulate text files of various formats, using the mechanisms provided by the Cocoa text system. The first argument indicates the operation to perform, one of:-hheellpp Show the usage information for the command and exit. This
is the default command option if none is specified.-iinnffoo Display information about the specified files.
-ccoonnvveerrtt fmt Convert the specified files to the indicated format and
write each one back to the file system.-ccaatt fmt Read the specified files, concatenate them, and write the
result out as a single file in the indicated format. fmt is one of: ttxxtt, hhttmmll, rrttff, rrttffdd, ddoocc, ddooccxx, wwoorrddmmll, ooddtt, or wweebbaarrcchhiivvee There are some additional options for general use:-eexxtteennssiioonn ext Specify an extension to be used for output files (by
default, the extension will be determined from the for-
mat).-oouuttppuutt path Specify the file name to be used for the first output
file.-ssttddiinn Specify that input should be read from stdin rather than
from files.-ssttddoouutt Specify that the first output file should go to stdout.
-eennccooddiinngg IANAname | NSStringEncoding
Specify the encoding to be used for plain text or HTML output files (by default, the output encoding will beUTF-8). NSStringEncoding refers to one of the numeric
values recognized by NSString. IANAname refers to an IANA character set name as understood by CFString. The operation will fail if the file cannot be converted to the specified encoding.-iinnppuutteennccooddiinngg IANAname | NSStringEncoding
Force all plain text input files to be interpreted using the specified encoding (by default, a file's encoding will be determined from its BOM). The operation willfail if the file cannot be interpreted using the speci-
fied encoding.-ffoorrmmaatt fmt Force all input files to be interpreted using the indi-
cated format (by default, a file's format will be deter-
mined from its contents).-ffoonntt font Specify the name of the font to be used for converting
plain to rich text.-ffoonnttssiizzee size Specify the size in points of the font to be used for
converting plain to rich text.-- Specify that all further arguments are file names.
There are some additional options for HTML and WebArchive files:-nnoollooaadd Do not load subsidiary resources.
-nnoossttoorree Do not write out subsidiary resources.
-bbaasseeuurrll url Specify a base URL to be used for relative URLs.
-ttiimmeeoouutt t Specify the time in seconds to wait for resources to
load.-tteexxttssiizzeemmuullttiipplliieerr x
Specify a numeric factor by which to multiply font sizes.-eexxcclluuddeeddeelleemmeennttss (tag1, tag2, ...)
Specify which HTML elements should not be used in gener-
ated HTML (the list should be a single argument, and so will usually need to be quoted in a shell context).-pprreeffiixxssppaacceess n Specify the number of spaces by which to indent nested
elements in generated HTML (default is 2). There are some additional options for treating metadata:-ssttrriipp Do not copy metadata from input files to output files.
-ttiittllee val Specify the title metadata attribute for output files.
-aauutthhoorr val Specify the author metadata attribute for output files.
-ssuubbjjeecctt val Specify the subject metadata attribute for output files.
-kkeeyywwoorrddss (val1, val2, ...)
Specify the keywords metadata attribute for output files (the list should be a single argument, and so will usually need to be quoted in a shell context).-ccoommmmeenntt val Specify the comment metadata attribute for output files.
-eeddiittoorr val Specify the editor metadata attribute for output files.
-ccoommppaannyy val Specify the company metadata attribute for output files.
-ccrreeaattiioonnttiimmee yyyy-mm-ddThh:mm:ssZ
Specify the creation time metadata attribute for output files.-mmooddiiffiiccaattiioonnttiimmee yyyy-mm-ddThh:mm:ssZ
Specify the modification time metadata attribute for output files. EEXXAAMMPPLLEESStextutil -info foo.rtf
displays information about foo.rtf.textutil -convert html foo.rtf
converts foo.rtf into foo.html.textutil -convert rtf -font Times -fontsize 10 foo.txt
converts foo.txt into foo.rtf, using Times 10 for the font.textutil -cat html -title "Several Files" -output index.html *.rtf
loads all RTF files in the current directory, concatenates their con-
tents, and writes the result out as index.html with the HTML title set to "Several Files". DIAGNOSTICS The tteexxttuuttiill command exits 0 on success, and 1 on failure. CCAAUUTTIIOONNSS Some options may require a connection to the window server. HISTORY The tteexxttuuttiill command first appeared in Mac OS X 10.4. Mac OS X September 9, 2004 Mac OS X