|
OSXFAQ Mac OS X UNIX Tip-of-the-Day

Week 106 - New in Tiger (2 January 2006)
by
Adrian Mayo - Editor, OSXFAQ
Thursday - More New Commands
Tiger includes the following commands that were not in earlier versions of Mac OS X.
1) The Korn shell in /bin/ksh, useful if you ever want to run a Korn shell script (or if you prefer to use Korn as your interactive shell!)
2) zless, part of the GNU zip toolkit, displays gzip compressed files directly using the less command. It's actually a very simple wrapper script:
$ cat /usr/bin/zless
#!/bin/sh
PATH="/usr/bin:$PATH"; export PATH
LESSOPEN="|gzip -cdfq %s"; export LESSOPEN
exec less "$@"
$
3) textutil, which is a command line interface to the Cocoa text system. Some examples of using textutil are:
To convert the HTML file index.html to rich text format, written to index.rtf, type:
$ textutil -convert rtf index.html
To convert the same file to an MS Word document, written to index.doc, type:
$ textutil -convert doc index.html
The -cat option is handy to concatenate all the input files into one big output file.
4) mdfind is a command line Spotlight. It searches through meta data for attribute values, or for specific attributes with given values.
Check the man pages for textutil and mdfind for full details.
Here's a handy tip to convert postscript output to PDF using Preview.app. In this example we pipe the raw postfix man page for bash into Preview.app.
$ man -t bash | open -f -a /Applications/Preview.app
|