anthracite tools: unix commands
Anthracite makes extensive use of the UNIX underpinnings of Mac OS X.
In particular, Source Objects can be created that bring the results of UNIX Commands into Anthracite as data, and Processor Objects can use the traditional "STDIO" feature of UNIX to pass data into and out of UNIX Commands that do filtering or other processing.
Often, even experienced UNIX users will forget either the exact title or the various arguments to commands, and beginning users may frequently need to refer to the built-in "manpage" documentation.
Anthracite makes this easy with the "Find UNIX Commands" window, where you can search for UNIX commands (using the classic tool apropos), and then read their associated manpages and see the path to execute them.

When configuring your UNIX Command objects, please remember that you must enter the complete path to the command, if you do not know the path, you can use Anthracite's built-in UNIX command finder as shown above, or use the "which" command from the Terminal program, eg:
user $ which grep /usr/bin/grep
Also remember to enter each "argument" to your command on its own line.
For example, settings for the command cut might be:
Below are notes on some of the commands and configurations that have been tested with the UNIX Command tools.
Sources:
ps - /bin/ps
top - /usr/bin/top
hostname - /bin/hostname
ls - /usr/bin/ls
uptime
[mysql]
Processors:
grep - /usr/bin/grep
uniq - /usr/bin/uniq
cut - /usr/bin/cut
each on their own line:
-f
1
-d
(last line is a space char, no quotes!)
sort - /usr/bin/sort
sed - /usr/bin/sed
arg: -e
arg: s/CA/California
(do not use single quotes)
head/tail
[your own shell scripts....]
Perl:
It's easy to integrate Anthracite with existing Perl scripts. Here's a screenshot showing how to use Perl directly within Anthracite, but you can also just as easily use your Perl script as the command itself, such as "/home/joe/scripts/PerlProc.pl" instead of the Perl binary itself.
/usr/bin/perl
-e 'while ( <STDIN> ) { print "foo:" . $_ }'
![]()
(From the "UNIX Command - Perl Touch" sample file on the distribution disk in Goodies).
[ Top of Page ] [ Metafy Home ]
last update: 8/23/2004
last update: 2/06/2004
last update: 3/27/2003
Copyright © 2004, All Rights Reserved, Metafy LLC