Re: Differences in output between AppleScript and Terminal
Re: Differences in output between AppleScript and Terminal
- Subject: Re: Differences in output between AppleScript and Terminal
- From: Christopher Stone <email@hidden>
- Date: Sun, 12 Mar 2017 01:03:23 -0600
On Mar 10, 2017, at 14:30, debt <email@hidden> wrote:
Anyway, running the Perl script in Terminal works the way I expect it to. Running the script in BBEdit works the why I expect it to. But calling it from AppleScript doesn’t. I guess I just don’t understand why AppleScript has to be the odd man out when it comes to this.
Hey Marc,
I suspect you should read Technical Note TN2065: do shell script in AppleScript.
Do shell script by design runs a completely unadulterated shell session.
The easiest way around this is to source your ~/.profile or ~/.bashrc or whatever file your shell customizations are in.
---------------------------------------- do shell script " source ~/.profile /usr/bin/env perl -e 'print \"$^V\";' " ----------------------------------------
That should reproduce the environment you're accustomed to in the Terminal.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden