> I found a solution... I put this in there:
>
> kill -3 $(ps wax | grep "[T]erminal.app" | awk '{print $1}')
>
> Its a bit brute, but it works.
I agree it's nasty... but how do you go about closing that specific
terminal. Or even better yet, how can I tell it to not even show the
terminal? When I run Perl's on windows, you just the the command
window blink as it runs, then it closes... how can I emulate this...
gracefully?
Patrick Machielse - 22 Jun 2007 17:31 GMT
> I agree it's nasty... but how do you go about closing that specific
> terminal. Or even better yet, how can I tell it to not even show the
> terminal? When I run Perl's on windows, you just the the command
> window blink as it runs, then it closes... how can I emulate this...
> gracefully?
You might be able to use AppleScript (through the osascript command) and
'tell window 0 of application 'Terminal' to close' (or someting similar
that actually works).
patrick
Ben Artin - 22 Jun 2007 23:02 GMT
> I agree it's nasty... but how do you go about closing that specific terminal.
Instead of using a .command file, use a .term file. The way you make one of
those is so open a new window in Terminal, set its settings the way you want
them, then use File > Save. All the window settings get saved, and you get to
specify which command is to be run when the file is loaded.
hth
Ben

Signature
If this message helped you, consider buying an item
from my wish list: <http://artins.org/ben/wishlist>
I changed my name: <http://periodic-kingdom.org/People/NameChange.php>
Bob Harris - 22 Jun 2007 23:50 GMT
> I agree it's nasty... but how do you go about closing that specific
> terminal. Or even better yet, how can I tell it to not even show the
> terminal? When I run Perl's on windows, you just the the command
> window blink as it runs, then it closes... how can I emulate this...
> gracefully?
-- AppleScript wrapper to execute UNIX shell scripts
-- with a drag and drop interface.
-- Found basic script at http://MacOSXHints.com
-- cmdenv is a program I originally wrote back in
-- 1985 to help me see what a fork/exec'ed program
-- was seeing. I find it highly useful.
-- Bob Harris 4-Jun-2005
on open filelist
repeat with i in filelist
-- do shell script "my_command " & quoted form of POSIX path of i
do shell script "yourScriptHere >/dev/null " & quoted form of
POSIX path of i
end repeat
end open
-- NOTE: the do shell line may be line warpped.
-- It is suppose be one line ending in "... POSIX path of i"
-- so if it has been lined wrapped put it back together again
-- Use the Applications -> AppleScript -> Script Editor
-- to create an executable AppleScript from the above.
Bob Harris