| jm3.net
|
11
|
 |
|
12-20-2002 07:12 PM ET (US)
|
|
the answer you need seems to depend on how you work, so:
if you run the script from a Terminal window, and want it closed as soon as your script executes, just can get the process id of the PARENT process (which will be the shell == your Terminal window) and kill that. essentially, you are writing a suicidal script, or technically, a patricidal script. (if you're the type of person who thinks about such things.)
the way to do the above is just to add: kill -9 $PPID to the end of your script.
(make sure your terminal prefs are set to close the window when the shell exits, or your stale window will hang around.)
on the other hand, if you mean to launch those apps on login, then just run your script from your .login/.profile/.bashrc/whatever init file corresponds with the shell you're using (most likely bash). then they'll stay open until you close them. (prolly not what you want, but who knows?)
finally, if you are using this script as a generic gui app-launcher, then it sounds like ssp's advice of using applescript is the way to go -- not because applescript is particularly capable, but because it's stitched to tightly to the gui. i swore off applescript in my university days, and so i can't speak to what its present day os-x capabilities are, but it would be a poor applescript indeed that couldn't fire off your shell script, giving you the power of the nix shell and the nice interface of aqua -- and isn't that what os/x is really all about?
|