Re: Shell and Perl scripts
Re: Shell and Perl scripts
- Subject: Re: Shell and Perl scripts
- From: Steve Hayman <email@hidden>
- Date: Sat, 7 May 2005 02:15:52 -0400
On 7-May-05, at 2:09 AM, Adam Wuellner wrote:
I think the problem is the working directory - Paul's test.sh is run
from /, inherits no PATH from its environment (other than /), and so
when it calls test.pl it can't be located without the full path.
Yup, that's it. Try putting "pwd" in for your script followed by a
"View Results", and it'll print the working directory, which is "/".
Apps launched from the finder, including Automator, generally run
with their current directory set to "/".
Given (no PATH environment variable), why *can* it find, for
example, mv and perl?
It's running bash to execute the script, and if bash sees an empty
PATH environment variable, it defaults to something like "/bin:/usr/
bin". So you get a reasonable PATH even if one isn't found in the
environment.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden