Re: Creating a double-clickable Terminal script
Re: Creating a double-clickable Terminal script
- Subject: Re: Creating a double-clickable Terminal script
- From: garbanzito <email@hidden>
- Date: Mon, 4 Mar 2002 17:35:06 -0700
at 2002 03 04, 17:26 -0500, they whom i call Rob Jorgensen wrote:
Howdy :-)
I'm not an OS X user (yet) but I thought this might be of interest
to those who need to send a series of commands to the Terminal. The
tip is on MacFixIt's home page today so get it while it's hot.
<http://www.macfixit.com/>
the ".command" extension making a shell script open in
Terminal was documented from the start, but i guess it's
little known. the ".command" extension isn't essential --
you can also use "open with application" in the Get Info box
to set any file to be opened by Terminal, which will then
interpret the file as a shell script. one thing that can
make these script seem not to work is if the file doesn't
have "execute" permission. the fix is the following shell
command:
chmod +x whatever.command
I wonder if one could launch/open/run this file with an AppleScript script.
sure:
do shell script "/bin/tcsh 'path_to_whatever.command'"
note the end of the line is a single quote followed by a
double-quote. this will run the script, but it won't open a
Terminal window. i've used tcsh since that's the default
shell that Terminal will use for these scripts, whereas "do
shell script" normally runs sh.
--
steve harley email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.