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 19:54:01 -0500
On Mar 12, 2017, at 19:04, debt <email@hidden> wrote:
I understand and agree with the premise, *however* I think we should be able to mimic the Terminal if we want to, but I haven’t found a way to do that.
Hey Marc,
I thought I just showed you how with source yourBashProfileFile – which loads up your current environment into the AppleScript do shell script session.
All I have to do is read the first line of the Perl script to grab the shebang line and then use that in the AppleScript. WooHoo! Problem solved.
That seems a trifle overly complicated.
---------------------------------------------------------------
tell application "System Events" set perlScriptPath to POSIX path of disk item "~/Downloads/test.pl" end tell
set perlParams to "one two three"
do shell script "source ~/.profile " & quoted form of perlScriptPath & space & perlParams
---------------------------------------------------------------
Provided your Perl script is marked executable this should work every time, and you can change the shebang line as you see fit.
|
_______________________________________________
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