You can use the open command (see the man page for details):also i'm interesed in opening a browser with a valid internet address as argument but i can't find out the syntax for mac os x - can anyone give a hand with that?
open -a Internet\ Explorer http://www.cnn.com
or, if you don't want to specify a particular app:
open http://www.cnn.com
...and the site will appear in the user's preferred browser.
As for closing the app, I'd see if there's an AppleScript way to do that. I agree that shooting it in the head seems a bit harsh ;-).
-- Matt
On Tuesday, December 10, 2002, at 12:44 PM, allan wrote:
hi2 small problems. i like to know how to close a program like Internet Explorer from perl. the little script below seem to work for me, but i guess there must be a cleaner and more correct way. also i'm interesed in opening a browser with a valid internet address as argument but i can't find out the syntax for mac os x - can anyone give a hand with that? thanks ./allan # killing my @output = `ps aux | grep '/Applications/Internet Explorer.app'`; foreach my $line (@output) { if ($line =~ m,^\s*$ENV{LOGNAME}\s+(\d+).+\d+:\d+.\d+\s+/Applications/Internet Explorer.app,) { system("kill", $1) } }