• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Creating a double-clickable Terminal script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Creating a double-clickable Terminal script (From: Rob Jorgensen <email@hidden>)

  • Prev by Date: OS X vs. classic AS compatibility
  • Next by Date: Re: Speeding Up Scripts 101
  • Previous by thread: Creating a double-clickable Terminal script
  • Next by thread: script object properties: seeking confirmation
  • Index(es):
    • Date
    • Thread