Re: passing shell script arguments?
Re: passing shell script arguments?
- Subject: Re: passing shell script arguments?
- From: Doug McNutt <email@hidden>
- Date: Thu, 2 Oct 2003 16:59:46 -0600
The syntax of tcsh, or even bash, scripts is far more predictable than AppleScript.
I strongly recommend that you abandon the idea of passing the text of the shell script through AppleScript for execution.
Rather go ahead and create the shell script. Set it's execute bit, and provide an appropriate shebang line at the beginning. You will have to give AppleScript a full path to the script you have created but you can pass arguments. Your .login or .profile will NOT be executed but your $HOME/.MacOSX/environment.plist will be honored. Personally I have set up a $HOME/bin directory for the purpose.
AppleScript will use bash. But then bash can run tcsh if that's in the shebang line of the file pointed to. The only possible problem is that $SHLVL will be 2 rather than the, perhaps expected, 1.
Someday Finder will acknowledge the execute bit and agree to execute such things directly but I'm pushing 70 and I'm not so sure I shall live to see it. Logging in to Aqua does not even execute your login/profile script for your declared default shell.
A recent example is available at:
<
ftp://ftp.macnauchtan.com/Software/LineEnds/FixEndsFolder.sit> (52kB)
It doesn't address your specific problem but it is a way to provide an AppleScript interface to good old fashioned CLI coding..
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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.