On 2005–10–13, at 19:36, Ted Zeng wrote:
As it turns out, only Sherm's version works
For all the situations.
Great! Go for it.
The tough bit about there being more than one way to do it is to
resist the temptation to try them all, even after you've found one
that works. I can't always
At 20:02 -0700 13/10/05, Ted Zeng wrote:
Here is the fun part: I made a killapp.pl script and
Call it to kill Bridge with
`killapp.pl Bridge `
And it kills itself.
As it turned out, the script finds itself from the list because the
Command line includes Bridge(or Adobe Illustrator for
* Peter N Lewis [EMAIL PROTECTED]
ps auxw | grep
inevitably finds the search command unless you use a trick like the above,
or:
ps auxw | grep | grep -v grep
Or, utterly off topic, the clever regex method, which may run afoul of
quoting rules in certain shells, but is quicker
I like these solution.
Thanks.
ted
On 10/13/05 10:59 PM, Peter N Lewis [EMAIL PROTECTED] wrote:
At 20:02 -0700 13/10/05, Ted Zeng wrote:
Here is the fun part: I made a killapp.pl script and
Call it to kill Bridge with
`killapp.pl Bridge `
And it kills itself.
As it turned out, the
I just uploaded Mac::Apps::Launch. Now IsRunning() returns the PSN, instead
of simple true/false (1/0).
Here's a fun, simple, and efficient script to kill the Dock (which should
relaunch immediately):
use Mac::Apps::Launch 1.92;
use Mac::Processes;
use POSIX 'SIGTERM';
my $psn =